Class WebSocketServerProtocolConfig.Builder
java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig.Builder
- Enclosing class:
WebSocketServerProtocolConfig
-
Method Summary
Modifier and TypeMethodDescriptionallowExtensions(boolean allowExtensions) allowMaskMismatch(boolean allowMaskMismatch) build()Build unmodifiable server protocol configuration.checkStartsWith(boolean checkStartsWith) trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default).closeOnProtocolViolation(boolean closeOnProtocolViolation) decoderConfig(WebSocketDecoderConfig decoderConfig) Frames decoder configuration.dropPongFrames(boolean dropPongFrames) trueif pong frames should not be forwardedexpectMaskedFrames(boolean expectMaskedFrames) forceCloseTimeoutMillis(long forceCloseTimeoutMillis) Close the connection if it was not closed by the client after timeout specifiedhandleCloseFrames(boolean handleCloseFrames) trueif close frames should not be forwarded and just close the channelhandshakeTimeoutMillis(long handshakeTimeoutMillis) Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUTmaxFramePayloadLength(int maxFramePayloadLength) sendCloseFrame(WebSocketCloseStatus sendCloseFrame) Close frame to send, when close frame was not send manually.subprotocols(String subprotocols) CSV of supported protocolswebsocketPath(String websocketPath) URI path component to handle websocket upgrade requests on.withUTF8Validator(boolean withUTF8Validator)
-
Method Details
-
websocketPath
URI path component to handle websocket upgrade requests on. -
subprotocols
CSV of supported protocols -
checkStartsWith
trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default). -
handshakeTimeoutMillis
Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT -
forceCloseTimeoutMillis
Close the connection if it was not closed by the client after timeout specified -
handleCloseFrames
trueif close frames should not be forwarded and just close the channel -
sendCloseFrame
Close frame to send, when close frame was not send manually. Ornullto disable proper close. -
dropPongFrames
trueif pong frames should not be forwarded -
decoderConfig
Frames decoder configuration. -
maxFramePayloadLength
-
expectMaskedFrames
-
allowMaskMismatch
-
allowExtensions
-
closeOnProtocolViolation
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation) -
withUTF8Validator
-
build
Build unmodifiable server protocol configuration.
-