Interface WebSocketServerFactory

    • Method Detail

      • wrapChannel

        java.nio.channels.ByteChannel wrapChannel​(java.nio.channels.SocketChannel channel,
                                                  java.nio.channels.SelectionKey key)
                                           throws java.io.IOException
        Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
        Parameters:
        channel - The SocketChannel to wrap
        key - a SelectionKey of an open SocketChannel.
        Returns:
        The channel on which the read and write operations will be performed.
        Throws:
        java.io.IOException - may be thrown while writing on the channel
      • close

        void close()
        Allows to shutdown the websocket factory for a clean shutdown