httpuv v1.5.2

0

Monthly downloads

0th

Percentile

HTTP and WebSocket Server Library

Provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It is primarily intended as a building block for other packages, rather than making it particularly easy to create complete web applications using httpuv alone. httpuv is built on top of the libuv and http-parser C libraries, both of which were developed by Joyent, Inc. (See LICENSE file for libuv and http-parser license information.)

Readme

httpuv: HTTP and WebSocket server library for R

Travis build status AppVeyor Build Status

httpuv provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It is primarily intended as a building block for other packages, rather than making it particularly easy to create complete web applications using httpuv alone. httpuv is built on top of the libuv and http-parser C libraries, both of which were developed by Joyent, Inc.

Installing

You can install the stable version from CRAN, or the development version using devtools:

# install from CRAN
install.packages("httpuv")

# or if you want to test the development version here
if (!require("devtools")) install.packages("devtools")
devtools::install_github("rstudio/httpuv")

Since httpuv contains C code, you'll need to make sure you're set up to install packages. Follow the instructions at http://www.rstudio.com/ide/docs/packages/prerequisites


Debugging builds

httpuv can be built with debugging options enabled. This can be done by uncommenting these lines in src/Makevars, and then installing. The first one enables thread assertions, to ensure that code is running on the correct thread; if not. The second one enables tracing statements: httpuv will print lots of messages when various events occur.

PKG_CPPFLAGS += -DDEBUG_THREAD -UNDEBUG
PKG_CPPFLAGS += -DDEBUG_TRACE

To install it directly from Github with these options, you can use with_makevars, like this:

withr::with_makevars(
  c(PKG_CPPFLAGS="-DDEBUG_TRACE -DDEBUG_THREAD -UNDEBUG"), {
    devtools::install_github("rstudio/httpuv")
  }, assignment = "+="
)

© 2013-2018 RStudio, Inc.

Functions in httpuv

Name Description
ipFamily Check whether an address is IPv4 or IPv6
WebServer WebServer class
interrupt Interrupt httpuv runloop
httpuv-package HTTP and WebSocket server
logLevel Get and set logging level
randomPort Find an open TCP port
WebSocket WebSocket class
staticPathOptions Create options for static paths
stopAllServers Stop all servers
PipeServer PipeServer class
encodeURI URI encoding/decoding
Server Server class
staticPath Create a staticPath object
startServer Create an HTTP/WebSocket server
getRNGState Apply the value of .Random.seed to R's internal RNG state
rawToBase64 Convert raw vector to Base64-encoded string
runServer Run a server
stopDaemonizedServer Stop a running daemonized server in Unix environments (deprecated)
stopServer Stop a server
listServers List all running httpuv servers
service Process requests
startDaemonizedServer Create an HTTP/WebSocket daemonized server (deprecated)
No Results!

Last month downloads

Details

Type Package
Encoding UTF-8
Copyright RStudio, Inc.; Joyent, Inc.; Nginx Inc.; Igor Sysoev; Niels Provos; Internet Systems Consortium, Inc.; Alexander Chemeris; Berkeley Software Design; Google Inc.; Sony Mobile Communications AB; Alexander Peslyak; Free Software Foundation, Inc.; X Consortium; Ben Noordhuis; StrongLoop, Inc.; Sal Ibarra Corretg; Bert Belder; Fedor Indutny; libuv project; Refael Ackermann; Kenneth MacKay; Emergya; Diego Petten; xine project, The Regents of the University of California, Dariusz Dwornikowski
License GPL (>= 2) | file LICENSE
LinkingTo Rcpp, BH, later
URL https://github.com/rstudio/httpuv
SystemRequirements GNU make
RoxygenNote 6.1.1
Collate 'RcppExports.R' 'httpuv.R' 'random_port.R' 'server.R' 'static_paths.R' 'utils.R'
NeedsCompilation yes
Packaged 2019-09-11 04:12:10 UTC; jcheng
Repository CRAN
Date/Publication 2019-09-11 05:40:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/httpuv)](http://www.rdocumentation.org/packages/httpuv)