Skip to content

Commit

Permalink
添加并发测试口
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleCatMySelf committed Oct 16, 2019
1 parent a875fc4 commit c1dc5c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Front-End-Testing/chat70.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
window.WebSocket = window.MozWebSocket;
}
if (window.WebSocket) {
socket = new WebSocket("ws://192.168.1.121:8070/ws");
socket = new WebSocket("ws://192.168.1.121:8090/ws");
socket.onmessage = function(event) {
var ta = document.getElementById('responseText');
ta.value = ta.value + '\n' + event.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,17 @@ protected void textdoMessage(ChannelHandlerContext ctx, TextWebSocketFrame msg)
}else{
throw new HandlerNotFoundException(UndefinedInChatConstant.NOT_HANDLER);
}
System.out.println(msg.text());
Map<String,Object> maps = (Map) JSON.parse(msg.text());
maps.put(Constants.TIME, new Date());
switch ((String)maps.get(Constants.TYPE)){
case Constants.LOGIN:
log.info(LogConstant.DEFAULTWEBSOCKETHANDLER_LOGIN);
handlerService.login(channel,maps);
break;
case "jmeter":
//Jmeter高并发测试
break;
//针对个人,发送给自己
case Constants.SEND_ME:
log.info(LogConstant.DEFAULTWEBSOCKETHANDLER_SENDME);
Expand Down

0 comments on commit c1dc5c4

Please sign in to comment.