Description Usage Arguments Details Value Author(s) See Also
Close a websocket server or client connection.
1 |
connection |
A websocket client or server. See the details section for more information. |
Use websocket_close
to cleanly shut down a websocket server or client
connection.
If the connection
is a websocket server, all associated client connections
will also be closed.
Connected clients are stored in the environment associated with a websocket
server in the client_sockets
list. Because each connected client is
itself an environment, be careful to access a single client element, for
example with the '[[' indexing operator, shown here accessing the first client
socket: WS$client_sockets[[1]]
.
An integer value returned by the underlying TCP socket close function which may vary in interpretation from system to system.
B. W. Lewis <blewis@illposed.net>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.