web_websocket_close
Closes a WebSocket connection.
C Language
int web_websocket_close("ID=connection ID", ["Code=<4_digit_ code>",] [ "Reason=<reason for closure>",] LAST);
Example: web_websocket_connect, web_websocket_close, web_websocket_send | Miscellaneous Functions |
ID | The ID of the connection to close. |
Code | The WebSocket connection close code. This can be an integer ranging from 1000 to 1011. |
Reason | A string indicating the reason of the closure. |
LAST | Required marker for the end of the argument list. |
web_websocket_close closes the WebSocket connection to the server with the specified ID. For a list of the callback functions, see WebSocket Callback Functions.
Return Values
This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
Parameterization
Standard Parameterization is supported for all of this function's arguments.