public interface IWebSocketConnection
Modifier and Type | Method and Description |
---|---|
void |
close(int code,
String reason)
Closes the underlying web socket connection
|
boolean |
isOpen() |
IWebSocketConnection |
sendMessage(byte[] message,
int offset,
int length)
Sends a binary message to the client.
|
void |
sendMessage(IWebSocketPushMessage message)
Broadcasts a push message to the wicket page (and it's components) associated with this
connection.
|
IWebSocketConnection |
sendMessage(String message)
Sends a text message to the client.
|
boolean isOpen()
true
when the underlying native web socket
connection is still open.void close(int code, String reason)
code
- the status codereason
- the reason to close the connectionIWebSocketConnection sendMessage(String message) throws IOException
message
- the text messagethis
object, for chaining methodsIOException
- when an IO error occurs during the write to the clientIWebSocketConnection sendMessage(byte[] message, int offset, int length) throws IOException
message
- the binary messageoffset
- the offset to read fromlength
- how much data to readthis
object, for chaining methodsIOException
- when an IO error occurs during the write to the clientvoid sendMessage(IWebSocketPushMessage message)
message
- the push message to sendCopyright © 2006–2022 Apache Software Foundation. All rights reserved.