public final class WebSocketClientHandshakerFactory extends Object
WebSocketClientHandshaker
of desired protocol version.Modifier and Type | Method and Description |
---|---|
static WebSocketClientHandshaker |
newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new handshaker.
|
public static WebSocketClientHandshaker newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders)
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 serversubprotocol
- Sub protocol request sent to the server. Null if no sub-protocol support is required.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framecustomHeaders
- Custom HTTP headers to send during the handshakepublic static WebSocketClientHandshaker newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
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 serversubprotocol
- Sub protocol request sent to the server. Null if no sub-protocol support is required.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framecustomHeaders
- Custom HTTP headers to send during the handshakemaxFramePayloadLength
- Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames.Copyright © 2008–2017 The Netty Project. All rights reserved.