websocket_close: Close a websocket connection.

Description Usage Arguments Details Value Author(s) See Also

Description

Close a websocket server or client connection.

Usage

1

Arguments

connection

A websocket client or server. See the details section for more information.

Details

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]].

Value

An integer value returned by the underlying TCP socket close function which may vary in interpretation from system to system.

Author(s)

B. W. Lewis <blewis@illposed.net>

See Also

websocket_write


rstudio/R-Websockets documentation built on May 28, 2019, 4:33 a.m.