Class WebSocketClientHandshaker13

java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker
io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13

public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker

Performs client side opening and closing handshakes for web socket specification version draft-ietf-hybi-thewebsocketprotocol- 17

  • Field Details

  • Constructor Details

    • WebSocketClientHandshaker13

      public WebSocketClientHandshaker13(URI webSocketURL, WebSocketVersion version, 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(URI webSocketURL, WebSocketVersion version, 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(URI webSocketURL, WebSocketVersion version, 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.
  • Method Details