Java Code Examples for

The following are Jave code examples for showing how to use attr() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: wecard-server   File:   View Source Code Vote up 5 votes
 * 连接被关闭
 * @param ctx
 * @throws Exception
public void channelInactive(ChannelHandlerContext ctx) throws Exception {

    AttributeKey<Session> attrKeySession = AttributeKey.valueOf("Session");
    Attribute<Session> attrSession = ctx.attr(attrKeySession);
    Session session = attrSession.get();

    logger.warn("client diconnect!");