static ConnectionInfo newConnectionInfo ( Channel c ) { SocketChannel channel = ( SocketChannel ) c ; InetSocketAddress hostAddress = channel . localAddress ( ) ; InetSocketAddress remoteAddress = getRemoteAddress ( channel ) ; String scheme = channel . pipeline ( ) . get ( SslHandler . class ) != null ? "https" : "http" ; return new ConnectionInfo ( hostAddress , remoteAddress , scheme ) ; }
Retrieve the connection information from the current connection directly