Learn R Programming

httpuv (version 1.3.0)

startDaemonizedServer: Create an HTTP/WebSocket daemonized server (experimental)

Description

Creates an HTTP/WebSocket server on the specified host and port. The server is daemonized so R interactive sessions are not blocked to handle requests.

Usage

startDaemonizedServer(host, port, app)

Arguments

host
A string that is a valid IPv4 address that is owned by this server, or "0.0.0.0" to listen on all IP addresses.
port
A number or integer that indicates the server port that should be listened on. Note that on most Unix-like systems including Linux and Mac OS X, port numbers smaller than 1025 require root privileges.
app
A collection of functions that define your application. See Details.

Value

Details

In contrast to servers created by startServer, calls to service are not needed to accept and handle connections. If the port cannot be bound (most likely due to permissions or because it is already bound), an error is raised.

The app parameter is where your application logic will be provided to the server. This can be a list, environment, or reference class that contains the following named functions/methods:

[object Object],[object Object],[object Object]

The startPipeServer variant is not supported yet.

See Also

startServer