Socket添加关闭会话接口

pull/22/head
rays 2021-08-13 16:03:29 +08:00
parent bf60703048
commit da6e6c7e7c
2 changed files with 14 additions and 0 deletions

View File

@ -47,6 +47,15 @@ public interface SocketOperatorApi {
**/
void sendMsgOfAllUserSession(String msgType, Object msg);
/**
* id
*
* @param socketId id
* @author majianguo
* @date 2021/8/13 16:00
**/
void closeSocketBySocketId(String socketId);
/**
*
* <p>

View File

@ -68,6 +68,11 @@ public class WebSocketOperator implements SocketOperatorApi {
}
}
@Override
public void closeSocketBySocketId(String socketId) {
SessionCenter.closed(socketId);
}
@Override
public void msgTypeCallback(String msgType, SocketMsgCallbackInterface callbackInterface) {
SocketMessageCenter.setMessageListener(msgType, callbackInterface);