Package reactor.netty.http.websocket
Interface WebsocketInbound
- All Superinterfaces:
NettyInbound
A websocket framed inbound.
- Since:
- 0.6
- Author:
- Stephane Maldini, Simon Baslé
-
Method Summary
Modifier and TypeMethodDescriptiondefault WebsocketInbound
Turn thisWebsocketInbound
into aggregating mode which will only produce fully formed frame that have been received fragmented.default WebsocketInbound
aggregateFrames
(int maxContentLength) Turn thisWebsocketInbound
into aggregating mode which will only produce fully formed frame that have been received fragmented.headers()
Returns the websocket remote headers sent during handshake.Receive the close status code and reason if sent by the remote peer, or empty if the connection completes otherwise.default Flux<WebSocketFrame>
Receive aFlux
ofWebSocketFrame
formed frame content.@Nullable String
Returns the websocket subprotocol negotiated by the client and server during the websocket handshake, or null if none was requested.Methods inherited from interface reactor.netty.NettyInbound
receive, receiveObject, withConnection
-
Method Details
-
selectedSubprotocol
@Nullable String selectedSubprotocol()Returns the websocket subprotocol negotiated by the client and server during the websocket handshake, or null if none was requested.- Returns:
- the subprotocol, or null
-
headers
HttpHeaders headers()Returns the websocket remote headers sent during handshake.- Returns:
- the websocket remote headers sent during handshake
-
receiveCloseStatus
Mono<WebSocketCloseStatus> receiveCloseStatus()Receive the close status code and reason if sent by the remote peer, or empty if the connection completes otherwise.Note: Some close status codes are designated for use in applications expecting a status code to indicate that the connection was closed etc. They are not meant to be set as a status code in a Close control frame as such these status codes cannot be used with
reactor.netty.http.websocket.WebsocketOutbound#sendClose*
methods. Consider checking RFC 6455#section-7.4 for a complete list of the close status codes. -
aggregateFrames
Turn thisWebsocketInbound
into aggregating mode which will only produce fully formed frame that have been received fragmented. Will aggregate up to 65,536 bytes per frame- Returns:
- this inbound
-
aggregateFrames
Turn thisWebsocketInbound
into aggregating mode which will only produce fully formed frame that have been received fragmented.- Parameters:
maxContentLength
- the maximum frame length- Returns:
- this inbound
-
receiveFrames
Receive aFlux
ofWebSocketFrame
formed frame content.- Returns:
- a
Flux
ofWebSocketFrame
formed frame content
-