service: Service events of a websocket server

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Service events queued for a websocket server.

Usage

1
service(context, timeout = 1000L, server=context)

Arguments

context

The websocket environment returned from createContext or create_server.

timeout

An integer value indicating the service timeout interval in milliseconds. The default value is one second.

server

Future versions of this package will drop the context terminology, replacing it with server. The context argument is maintained in this package version for backwards compatibility with previous package versions.

Details

Websocket events are placed in a queue and are serviced on a first-come, first-served basis by the service function. This function is normally placed in a loop. The function times out after the specified interval if events do not occur.

Value

NULL is invisibly returned

Author(s)

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

See Also

createContext create_server

Examples

1
# See the detailed example in help('websockets')

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