Package io.quarkus.websockets.next
Interface Sender
- All Known Subinterfaces:
BlockingSender,WebSocketClientConnection,WebSocketConnection,WebSocketConnection.BroadcastSender
- All Known Implementing Classes:
WebSocketClientConnectionImpl,WebSocketConnectionImpl
@Experimental("This API is experimental and may change in the future")
public interface Sender
Sends messages to the connected WebSocket client.
-
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.io.smallrye.mutiny.Uni<Void>sendPing(io.vertx.core.buffer.Buffer data) Send a ping message.io.smallrye.mutiny.Uni<Void>sendPong(io.vertx.core.buffer.Buffer data) Send an unsolicited pong message.io.smallrye.mutiny.Uni<Void>Send a text message.<M> io.smallrye.mutiny.Uni<Void>sendText(M message) Send a text message.
-
Method Details
-
sendText
Send a text message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendText
Send a text message.- Type Parameters:
M-- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendBinary
Send a binary message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendBinary
Send a binary message.- Parameters:
message-- Returns:
- a new
Uniwith anullitem
-
sendPing
Send a ping message.- Parameters:
data- May be at most 125 bytes- Returns:
- a new
Uniwith anullitem
-
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
-