Learn R Programming

servr (version 0.2)

daemon_stop: Utilities for daemonized servers

Description

The server functions in this package will return server handles if daemonized servers were used (e.g., servr::httd(daemon = TRUE)). You can pass the handles to daemon_stop() to stop the daemonized servers. Because stopping a daemonized server more than once using httpuv::stopDaemonizedServer() will crash the R session, this function will check if a server has been stopped before really attempting to stop it, so it is safer than the stopDaemonizedServer() in httpuv.

Usage

daemon_stop(which = daemon_list())

daemon_list()

Arguments

which
the server handles returned by server functions; by default, all existing handles in the current R session obtained from daemon_list(), i.e., all daemon servers will be stopped by default

Value

  • The function daemon_list() returns a list of existing server handles, and daemon_stop() returns an invisible NULL.