Top Description Methods
reactor.netty.http.websocket

public Interface WebsocketInbound

extends NettyInbound
Known Direct Implementers
reactor.netty.http.client.WebsocketClientOperations, reactor.netty.http.server.WebsocketServerOperations
Imports
io.netty.handler.codec.http.HttpHeaders, io.netty.handler.codec.http.websocketx.WebSocketCloseStatus, .WebSocketFrame, .WebSocketFrameAggregator, reactor.core.publisher.Flux, .Mono, reactor.netty.NettyInbound, .NettyPipeline, reactor.util.annotation.Nullable

A websocket framed inbound.
Authors
Stephane Maldini, Simon Baslé
Since
0.6

Method Summary

Modifier and TypeMethod and Description
public default WebsocketInbound

Returns:

this inbound
aggregateFrames
()

Turn this WebsocketInbound into aggregating mode which will only produce fully formed frame that have been received fragmented.

public default WebsocketInbound

Returns:

this inbound
aggregateFrames
(int
the maximum frame length
maxContentLength
)

Turn this WebsocketInbound into aggregating mode which will only produce fully formed frame that have been received fragmented.

public HttpHeaders

Returns:

the websocket remote headers sent during handshake
headers
()

Returns the websocket remote headers sent during handshake.

public Mono<WebSocketCloseStatus>
receiveCloseStatus()

Receive the close status code and reason if sent by the remote peer, or empty if the connection completes otherwise.

public default Flux<WebSocketFrame>

Returns:

a Flux of WebSocketFrame formed frame content
receiveFrames
()

Receive a Flux of WebSocketFrame formed frame content.

public String

Returns:

the subprotocol, or null
selectedSubprotocol
()

Returns the websocket subprotocol negotiated by the client and server during the websocket handshake, or null if none was requested.

Inherited from reactor.netty.NettyInbound:
receivereceiveObjectwithConnection

Method Detail

aggregateFramesback to summary
public default WebsocketInbound aggregateFrames()

Turn this WebsocketInbound 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:WebsocketInbound

this inbound

aggregateFramesback to summary
public default WebsocketInbound aggregateFrames(int maxContentLength)

Turn this WebsocketInbound into aggregating mode which will only produce fully formed frame that have been received fragmented.

Parameters
maxContentLength:int

the maximum frame length

Returns:WebsocketInbound

this inbound

headersback to summary
public HttpHeaders headers()

Returns the websocket remote headers sent during handshake.

Returns:HttpHeaders

the websocket remote headers sent during handshake

receiveCloseStatusback to summary
public 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.

receiveFramesback to summary
public default Flux<WebSocketFrame> receiveFrames()

Receive a Flux of WebSocketFrame formed frame content.

Returns:Flux<WebSocketFrame>

a Flux of WebSocketFrame formed frame content

selectedSubprotocolback to summary
public String selectedSubprotocol()

Returns the websocket subprotocol negotiated by the client and server during the websocket handshake, or null if none was requested.

Returns:String

the subprotocol, or null

Annotations
@Nullable