public interface WebsocketOutbound extends NettyOutbound
| Modifier and Type | Field and Description |
|---|---|
static Function<? super ByteBuf,? extends WebSocketFrame> |
bytebufToWebsocketFrame |
static Function<? super String,? extends WebSocketFrame> |
stringToWebsocketFrame |
| Modifier and Type | Method and Description |
|---|---|
String |
selectedSubprotocol()
Returns the websocket subprotocol negotiated by the client and server during
the websocket handshake, or null if none was requested.
|
NettyOutbound |
send(Publisher<? extends ByteBuf> dataStream) |
Mono<Void> |
sendClose()
Prepare to send a close frame on subscribe then close the underlying channel
|
Mono<Void> |
sendClose(int rsv)
Prepare to send a close frame on subscribe then close the underlying channel
|
Mono<Void> |
sendClose(int rsv,
int statusCode,
String reasonText)
Prepare to send a close frame on subscribe then close the underlying channel
|
Mono<Void> |
sendClose(int statusCode,
String reasonText)
Prepare to send a close frame on subscribe then close the underlying channel
|
default NettyOutbound |
sendString(Publisher<? extends String> dataStream,
Charset charset) |
alloc, neverComplete, send, sendByteArray, sendFile, sendFile, sendFileChunked, sendGroups, sendObject, sendObject, sendObject, sendString, sendUsing, subscribe, then, then, then, withConnectionstatic final Function<? super String,? extends WebSocketFrame> stringToWebsocketFrame
static final Function<? super ByteBuf,? extends WebSocketFrame> bytebufToWebsocketFrame
@Nullable String selectedSubprotocol()
NettyOutbound send(Publisher<? extends ByteBuf> dataStream)
send in interface NettyOutboundMono<Void> sendClose()
Mono fulfilled when the send succeeded or failed, immediately
completed if already closedMono<Void> sendClose(int rsv)
rsv - reserved bits used for protocol extensionsMono fulfilled when the send succeeded or failed, immediately
completed if already closedMono<Void> sendClose(int statusCode, @Nullable String reasonText)
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.Mono fulfilled when the send succeeded or failed, immediately
completed if already closedIllegalArgumentException - 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.Mono<Void> sendClose(int rsv, int statusCode, @Nullable String reasonText)
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.Mono fulfilled when the send succeeded or failed, immediately
completed if already closedIllegalArgumentException - 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.default NettyOutbound sendString(Publisher<? extends String> dataStream, Charset charset)
sendString in interface NettyOutbound