Package reactor.netty.http.websocket
Interface WebsocketOutbound
- All Superinterfaces:
NettyOutbound,Publisher<Void>
A websocket framed outbound.
- Since:
- 0.6
- Author:
- Stephane Maldini, Simon Baslé
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<? super ByteBuf,? extends WebSocketFrame> static final Function<? super String,? extends WebSocketFrame> -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the websocket subprotocol negotiated by the client and server during the websocket handshake, or null if none was requested.Prepare to send a close frame on subscribe then close the underlying channel.sendClose(int rsv) Prepare to send a close frame on subscribe then close the underlying channel.Prepare to send a close frame on subscribe then close the underlying channel.Prepare to send a close frame on subscribe then close the underlying channel.default NettyOutboundsendString(Publisher<? extends String> dataStream, Charset charset) Methods inherited from interface reactor.netty.NettyOutbound
alloc, neverComplete, send, sendByteArray, sendFile, sendFile, sendFileChunked, sendGroups, sendObject, sendObject, sendObject, sendString, sendUsing, subscribe, then, then, then, withConnection
-
Field Details
-
stringToWebsocketFrame
-
bytebufToWebsocketFrame
-
-
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
-
send
- Specified by:
sendin interfaceNettyOutbound
-
sendClose
Prepare to send a close frame on subscribe then close the underlying channel.- Returns:
- a
Monofulfilled when the send succeeded or failed, immediately completed if already closed
-
sendClose
Prepare to send a close frame on subscribe then close the underlying channel.- Parameters:
rsv- reserved bits used for protocol extensions- Returns:
- a
Monofulfilled when the send succeeded or failed, immediately completed if already closed
-
sendClose
Prepare to send a close frame on subscribe then close the underlying channel.- Parameters:
statusCode- Integer status code as per RFC 6455#section-7.4. For example, 1000 indicates normal closure.reasonText- Reason text. Set to null if no text.- Returns:
- a
Monofulfilled when the send succeeded or failed, immediately completed if already closed - Throws:
IllegalArgumentException- when the status code MUST NOT be set as a status code in a Close control frame. Consider checking RFC 6455#section-7.4 for a complete list of the close status codes.
-
sendClose
Prepare to send a close frame on subscribe then close the underlying channel.- Parameters:
rsv- reserved bits used for protocol extensionsstatusCode- Integer status code as per RFC 6455#section-7.4. For example, 1000 indicates normal closure.reasonText- Reason text. Set to null if no text.- Returns:
- a
Monofulfilled when the send succeeded or failed, immediately completed if already closed - Throws:
IllegalArgumentException- when the status code MUST NOT be set as a status code in a Close control frame. Consider checking RFC 6455#section-7.4 for a complete list of the close status codes.
-
sendString
- Specified by:
sendStringin interfaceNettyOutbound
-