@Override
    public String toString() {
        final SocketAddress peer = channelHandlerContext.channel().remoteAddress();
        return this.getClass().getSimpleName() + "{peer: " + (peer == null ? "(unknown)" : peer) + ", state: " + state + ", session: " + session + ", Netty channel handler context name: " + channelHandlerContext.name() + "}";
    }
Updates the system counter of written bytes. This information is used by the "outgoing bytes" statistic.

@param ctx the context for the channel writing bytes
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java