Learn R Programming

websockets (version 1.1.7)

service: Service events of a websocket server

Description

Service events queued for a websocket server.

Usage

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.

Value

NULL is invisibly returned

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.

See Also

createContext create_server

Examples

Run this code
# NOT RUN {
# See the detailed example in help('websockets')
# }

Run the code above in your browser using DataLab