Interface Sender
- All Known Subinterfaces:
Connection,WebSocketClientConnection,WebSocketConnection,WebSocketConnection.BroadcastSender
- All Known Implementing Classes:
WebSocketClientConnectionImpl,WebSocketConnectionBase,WebSocketConnectionImpl
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.smallrye.mutiny.Uni<Void> sendBinary(byte[] message) Send a binary message.io.smallrye.mutiny.Uni<Void> sendBinary(io.vertx.core.buffer.Buffer message) Send a binary message.default voidsendBinaryAndAwait(byte[] message) Sends a binary message and waits for the completion.default voidsendBinaryAndAwait(io.vertx.core.buffer.Buffer message) Sends a binary message and waits for the completion.io.smallrye.mutiny.Uni<Void> sendPing(io.vertx.core.buffer.Buffer data) Send a ping message.default voidsendPingAndAwait(io.vertx.core.buffer.Buffer data) Send a ping message and waits for the completion.io.smallrye.mutiny.Uni<Void> sendPong(io.vertx.core.buffer.Buffer data) Send an unsolicited pong message.default voidsendPongAndAwait(io.vertx.core.buffer.Buffer data) Send an unsolicited pong message and waits for the completion.io.smallrye.mutiny.Uni<Void> Send a text message.<M> io.smallrye.mutiny.Uni<Void> sendText(M message) Send a text message.default voidsendTextAndAwait(String message) Sends a text message and waits for the completion.default <M> voidsendTextAndAwait(M message) Sends a text message and waits for the completion.
-
Method Details
-
sendText
Send a text message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendTextAndAwait
Sends a text message and waits for the completion.This method should never be called on an event loop thread.
- Parameters:
message-
-
sendText
Send a text message.A
TextMessageCodecis used to encode the message.- Type Parameters:
M-- Parameters:
message-- Returns:
- a new
Uniwith anullitem - See Also:
-
sendTextAndAwait
default <M> void sendTextAndAwait(M message) Sends a text message and waits for the completion.A
TextMessageCodecis used to encode the message.This method should never be called on an event loop thread.
- Type Parameters:
M-- Parameters:
message-- See Also:
-
sendBinary
Send a binary message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendBinaryAndAwait
default void sendBinaryAndAwait(io.vertx.core.buffer.Buffer message) Sends a binary message and waits for the completion.This method should never be called on an event loop thread.
- Parameters:
message-
-
sendBinary
Send a binary message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendBinaryAndAwait
default void sendBinaryAndAwait(byte[] message) Sends a binary message and waits for the completion.This method should never be called on an event loop thread.
- Parameters:
message-
-
sendPing
Send a ping message.- Parameters:
data- May be at most 125 bytes- Returns:
- a new
Uniwith anullitem
-
sendPingAndAwait
default void sendPingAndAwait(io.vertx.core.buffer.Buffer data) Send a ping message and waits for the completion.This method should never be called on an event loop thread.
- Parameters:
data- May be at most 125 bytes
-
sendPong
Send an unsolicited pong message.Note that the server automatically responds to a ping message sent from the client. However, the RFC 6455 section 5.5.3 states that unsolicited pong may serve as a unidirectional heartbeat.
- Parameters:
data- May be at most 125 bytes- Returns:
- a new
Uniwith anullitem
-
sendPongAndAwait
default void sendPongAndAwait(io.vertx.core.buffer.Buffer data) Send an unsolicited pong message and waits for the completion.This method should never be called on an event loop thread.
Note that the server automatically responds to a ping message sent from the client. However, the RFC 6455 section 5.5.3 states that unsolicited pong may serve as a unidirectional heartbeat.
- Parameters:
data- May be at most 125 bytes
-