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,
later::run_now() is called).
Usage
service(timeoutMs = ifelse(interactive(), 100, 1000))Details
In previous versions of httpuv (1.3.5 and below), even if a server created by
startServer() exists, no requests were serviced unless and until
service was called.
This function simply calls later::run_now(), so if your
application schedules any later::later() callbacks, they will be
invoked.