Class NioSocketSession

    • Constructor Detail

      • NioSocketSession

        public NioSocketSession​(IoService service,
                                IoProcessor<NioSession> processor,
                                java.nio.channels.SocketChannel channel)
        Creates a new instance of NioSocketSession.
        Parameters:
        service - the associated IoService
        processor - the associated IoProcessor
        channel - the used channel
    • Method Detail

      • getSocket

        private java.net.Socket getSocket()
      • getChannel

        java.nio.channels.SocketChannel getChannel()
        Specified by:
        getChannel in class NioSession
        Returns:
        The ByteChannel associated with this IoSession
      • getRemoteAddress

        public java.net.InetSocketAddress getRemoteAddress()
        Returns:
        the socket address of remote peer.
      • getLocalAddress

        public java.net.InetSocketAddress getLocalAddress()
        Returns:
        the socket address of local machine which is associated with this session.
      • isSecured

        public final boolean isSecured()
        Specified by:
        isSecured in interface IoSession
        Overrides:
        isSecured in class AbstractIoSession
        Returns:
        true if the session has started and initialized a SslEngine, false if the session is not yet secured (the handshake is not completed) or if SSL is not set for this session, or if SSL is not even an option.