We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当接收到连接时, public static void addClientConnection(ChannelHandlerContext c) { //fixme 之后重复登录需要踢掉原来的连接 ClientConnection conn = new ClientConnection(c);
if(ClientConnectionMap.allClientMap.putIfAbsent(conn.getNetId(), conn) != null) { logger.error("Duplicated netid"); } }
这里什么case会 != null呢 ? 因为每次都是new 一个新的Connection ,然后id会incrementAndGet
另外如果重复登录要踢掉原来的连接,如何知道是重复登录呢?
The text was updated successfully, but these errors were encountered:
采用统一session认证的方式
Sorry, something went wrong.
这里缺少一个客户端管理,比如加一个心跳包的响应,用一个map管理起来.下次在进来的时候,从map中发现是否已经一个没有失效的clientInfo
No branches or pull requests
当接收到连接时,
public static void addClientConnection(ChannelHandlerContext c) {
//fixme 之后重复登录需要踢掉原来的连接
ClientConnection conn = new ClientConnection(c);
这里什么case会 != null呢 ? 因为每次都是new 一个新的Connection ,然后id会incrementAndGet
另外如果重复登录要踢掉原来的连接,如何知道是重复登录呢?
The text was updated successfully, but these errors were encountered: