Clients -
http :
WebSocketCaller
Represents a WebSocket caller.
Remote Methods
Push text to the connection.
Push binary data to the connection.
Ping the connection.
Send pong message to the connection.
Close the connection.
Fields
pushText
(string | json | xml | boolean | int | float | byte | byte[] data, boolean finalFrame)
returns error?Push text to the connection.
-
Return Type
(error?) error
if an error occurs when sending
Push binary data to the connection.
Parameters
- data byte[]
-
Binary data to be sent
- finalFrame boolean - true
-
Set to
true
if this is a final frame of a (long) message
-
Return Type
(error?) error
if an error occurs when sending
Ping the connection.
Parameters
- data byte[]
-
Binary data to be sent.
-
Return Type
(error?) error
if an error occurs when sending
Send pong message to the connection.
Parameters
- data byte[]
-
Binary data to be sent
-
Return Type
(error?) error
if an error occurs when sending
Close the connection.
Parameters
- statusCode int? - 1000
-
Status code for closing the connection
- reason string? - ()
-
Reason for closing the connection
- timeoutInSecs int - 60
-
Time to wait for the close frame to be received from the remote endpoint before closing the connection. If the timeout exceeds, then the connection is terminated even though a close frame is not received from the remote endpoint. If the value < 0 (e.g., -1), then the connection waits until a close frame is received. If WebSocket frame is received from the remote endpoint, within waiting period the connection is terminated immediately.
-
Return Type
(error?) error
if an error occurs when sending