public class WebSocketServerHandshakerFactory
extends java.lang.Object
构造器和说明 |
---|
WebSocketServerHandshakerFactory(java.lang.String webSocketURL,
java.lang.String subprotocols,
boolean allowExtensions)
Constructor
|
WebSocketServerHandshakerFactory(java.lang.String webSocketURL,
java.lang.String subprotocols,
boolean allowExtensions,
long maxFramePayloadLength)
Constructor
|
限定符和类型 | 方法和说明 |
---|---|
WebSocketServerHandshaker |
newHandshaker(HttpRequest req)
Instances a new handshaker
|
ChannelFuture |
sendUnsupportedWebSocketVersionResponse(Channel channel)
Return that we need cannot not support the web socket version
|
public WebSocketServerHandshakerFactory(java.lang.String webSocketURL, java.lang.String subprotocols, boolean allowExtensions)
subprotocols
- CSV of supported protocols. Null if sub protocols not supported.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framepublic WebSocketServerHandshakerFactory(java.lang.String webSocketURL, java.lang.String subprotocols, boolean allowExtensions, long maxFramePayloadLength)
webSocketURL
- URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL.subprotocols
- CSV of supported protocols. Null if sub protocols not supported.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framemaxFramePayloadLength
- Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames.public WebSocketServerHandshaker newHandshaker(HttpRequest req)
public ChannelFuture sendUnsupportedWebSocketVersionResponse(Channel channel)
channel
- Channel