EVOLUTION-MANAGER
Edit File: service.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Process requests</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for service {httpuv}"><tr><td>service {httpuv}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Process requests</h2> <h3>Description</h3> <p>Process HTTP requests and WebSocket messages. If there is nothing on R's call stack – if R is sitting idle at the command prompt – it is not necessary to call this function, because requests will be handled automatically. However, if R is executing code, then requests will not be handled until either the call stack is empty, or this function is called (or alternatively, <code><a href="../../later/html/run_now.html">run_now</a></code> is called). </p> <h3>Usage</h3> <pre> service(timeoutMs = ifelse(interactive(), 100, 1000)) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>timeoutMs</code></td> <td> <p>Approximate number of milliseconds to run before returning. It will return this duration has elapsed. If 0 or Inf, then the function will continually process requests without returning unless an error occurs. If NA, performs a non-blocking run without waiting.</p> </td></tr> </table> <h3>Details</h3> <p>In previous versions of httpuv (1.3.5 and below), even if a server created by <code><a href="startServer.html">startServer</a></code> exists, no requests were serviced unless and until <code>service</code> was called. </p> <p>This function simply calls <code><a href="../../later/html/run_now.html">run_now</a>()</code>, so if your application schedules any <code><a href="../../later/html/later.html">later</a></code> callbacks, they will be invoked. </p> <h3>Examples</h3> <pre> ## Not run: while (TRUE) { service() } ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>httpuv</em> version 1.5.4 <a href="00Index.html">Index</a>]</div> </body></html>