public class WebSocketClientHandshakerFactory
extends java.lang.Object
| 构造器和说明 |
|---|
WebSocketClientHandshakerFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
WebSocketClientHandshaker |
newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
java.util.Map<java.lang.String,java.lang.String> customHeaders)
Instances a new handshaker
|
WebSocketClientHandshaker |
newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
java.util.Map<java.lang.String,java.lang.String> customHeaders,
long maxFramePayloadLength)
Instances a new handshaker
|
public WebSocketClientHandshaker newHandshaker(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, java.util.Map<java.lang.String,java.lang.String> 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 handshakeWebSocketHandshakeExceptionpublic WebSocketClientHandshaker newHandshaker(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, java.util.Map<java.lang.String,java.lang.String> customHeaders, long 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.WebSocketHandshakeException