Class WebSocketClientHandshaker13

    • Field Detail

      • expectedChallengeResponseString

        private java.lang.String expectedChallengeResponseString
      • allowExtensions

        private final boolean allowExtensions
      • performMasking

        private final boolean performMasking
      • allowMaskMismatch

        private final boolean allowMaskMismatch
    • Constructor Detail

      • WebSocketClientHandshaker13

        public WebSocketClientHandshaker13​(java.net.URI webSocketURL,
                                           WebSocketVersion version,
                                           java.lang.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.
        version - Version of web socket specification to use to connect to the server
        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​(java.net.URI webSocketURL,
                                           WebSocketVersion version,
                                           java.lang.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.
        version - Version of web socket specification to use to connect to the server
        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​(java.net.URI webSocketURL,
                                           WebSocketVersion version,
                                           java.lang.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.
        version - Version of web socket specification to use to connect to the server
        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.
      • WebSocketClientHandshaker13

        WebSocketClientHandshaker13​(java.net.URI webSocketURL,
                                    WebSocketVersion version,
                                    java.lang.String subprotocol,
                                    boolean allowExtensions,
                                    HttpHeaders customHeaders,
                                    int maxFramePayloadLength,
                                    boolean performMasking,
                                    boolean allowMaskMismatch,
                                    long forceCloseTimeoutMillis,
                                    boolean absoluteUpgradeUrl)
        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.
        version - Version of web socket specification to use to connect to the server
        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.
        absoluteUpgradeUrl - Use an absolute url for the Upgrade request, typically when connecting through an HTTP proxy over clear HTTP