Package org.spincast.plugins.undertow
Interface UndertowWebsocketEndpointWriter
- All Known Implementing Classes:
SpincastUndertowWebsocketEndpointWriter
public interface UndertowWebsocketEndpointWriter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendClosingConnection
(int closingCode, String closingReason, Set<String> peerIds, ClosedEventSentCallback callback) Sends a "closing connection" message to specified peers.void
sendMessage
(Set<String> peerIds, byte[] bytes, WebsocketPeersWriteCallback callback) Sends a byte array message to specific peers.void
sendMessage
(Set<String> peerIds, String message, WebsocketPeersWriteCallback callback) Sends a String message to specific peers.void
sendPings
(WebsocketPeersWriteCallback callback) Sends aping
message to all peers.
-
Method Details
-
sendPings
Sends aping
message to all peers. -
sendMessage
Sends a String message to specific peers. -
sendMessage
Sends a byte array message to specific peers.- Throws:
PeersClosedWriteException
- if some peers connections were found to be closed when trying to write.
-
sendClosingConnection
void sendClosingConnection(int closingCode, String closingReason, Set<String> peerIds, ClosedEventSentCallback callback) Sends a "closing connection" message to specified peers. No exception thrown if the message can't be sent.
-