Class WebSocketClientHandshaker13

    • Constructor Detail

      • WebSocketClientHandshaker13

        public WebSocketClientHandshaker13​(URI webSocketURL,
                                           String subprotocol,
                                           boolean allowExtensions,
                                           HttpHeaders customHeaders,
                                           int maxFramePayloadLength)
        Creates a new instance.
        Parameters:
        webSocketURL - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        subprotocol - Sub protocol request sent to the server.
        allowExtensions - Allow extensions to be used in the reserved bits of the web socket frame
        customHeaders - Map of custom headers to add to the client request
        maxFramePayloadLength - Maximum length of a frame's payload
      • WebSocketClientHandshaker13

        public WebSocketClientHandshaker13​(URI webSocketURL,
                                           String subprotocol,
                                           boolean allowExtensions,
                                           HttpHeaders customHeaders,
                                           int maxFramePayloadLength,
                                           boolean performMasking,
                                           boolean allowMaskMismatch)
        Creates a new instance.
        Parameters:
        webSocketURL - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        subprotocol - Sub protocol request sent to the server.
        allowExtensions - Allow extensions to be used in the reserved bits of the web socket frame
        customHeaders - Map of custom headers to add to the client request
        maxFramePayloadLength - Maximum length of a frame's payload
        performMasking - Whether to mask all written websocket frames. This must be set to true in order to be fully compatible with the websocket specifications. Client applications that communicate with a non-standard server which doesn't require masking might set this to false to achieve a higher performance.
        allowMaskMismatch - When set to true, frames which are not masked properly according to the standard will still be accepted.
      • WebSocketClientHandshaker13

        public WebSocketClientHandshaker13​(URI webSocketURL,
                                           String subprotocol,
                                           boolean allowExtensions,
                                           HttpHeaders customHeaders,
                                           int maxFramePayloadLength,
                                           boolean performMasking,
                                           boolean allowMaskMismatch,
                                           long forceCloseTimeoutMillis)
        Creates a new instance.
        Parameters:
        webSocketURL - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        subprotocol - Sub protocol request sent to the server.
        allowExtensions - Allow extensions to be used in the reserved bits of the web socket frame
        customHeaders - Map of custom headers to add to the client request
        maxFramePayloadLength - Maximum length of a frame's payload
        performMasking - Whether to mask all written websocket frames. This must be set to true in order to be fully compatible with the websocket specifications. Client applications that communicate with a non-standard server which doesn't require masking might set this to false to achieve a higher performance.
        allowMaskMismatch - When set to true, frames which are not masked properly according to the standard will still be accepted
        forceCloseTimeoutMillis - Close the connection if it was not closed by the server after timeout specified.