Class WebsocketConnectionClient2

    • Field Detail

      • address

        protected java.lang.String address
        The connection address.
      • wsclient

        protected org.java_websocket.client.WebSocketClient wsclient
        The websocket client.
    • Method Detail

      • connect

        public IFuture<IWebSocketConnection> connect()
        Establishes the connection.
        Returns:
        This object when done, exception on connection error.
      • sendMessage

        public IFuture<java.lang.Integer> sendMessage​(byte[] header,
                                                      byte[] body)
        Description copied from interface: IWebSocketConnection
        Send bytes using the connection.
        Parameters:
        header - The message header.
        body - The message body.
        Returns:
        A future indicating success.
      • close

        public void close()
        Description copied from interface: IWebSocketConnection
        Closes the connection (ignored if already closed).
      • forceClose

        public void forceClose()
        Description copied from interface: IWebSocketConnection
        Forcibly closes the connection (ignored if already closed).
      • sendAsFrames

        protected IFuture<java.lang.Void> sendAsFrames​(byte[] data)
        Fragment and send data as websocket frames.
        Parameters:
        data - The data.
        fut - The future.