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.)


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.

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


© 2013-2014 RStudio, Inc.

News

  • Error messages are now sent as UTF-8.

  • httpuv no longer adds a Content-Length header if one has already been provided. This is for Shiny issue #876.

  • Add encodeURI, encodeURIComponent, decodeURI, and decodeURIComponent functions.

  • Compatibility with Rook middleware reference classes.

  • Fix bug where websocket headers split over multiple packets would cause the payload to be parsed incorrectly.
  • Add experimental support for running httpuv servers in the background (see ?startDaemonizedServer and ?stopDaemonizedServer). Many thanks to Héctor Corrada Bravo for the contribution!
  • Require Rcpp 0.11.0. The absence of this requirement made it too easy for Windows and Mac users with Rcpp 0.10 already installed to grab httpuv 1.2.2 binaries from CRAN, which are built against Rcpp 0.11, causing bad crashes due to Rcpp's linkage changes.
  • Export base64 encoding function rawToBase64.

  • Compatibility work for Rcpp 0.11.0.

  • Solaris 10 compatibility fixes (courtesy of Dr. Brian Ripley).
  • Fix IE10 websocket handshake failure.

  • Implement hixie-76 version of WebSocket protocol, for Safari 4 and QtWebKit.

  • Fix issue #8: Bug in concurrent uploads.

  • Add interrupt() function for stopping the runloop.

  • Add REMOTE_ADDR and REMOTE_PORT to request environment.

  • Switch from git submodules to git subtree; much easier installation of development builds.

  • Upgrade to libuv v0.10.13.

  • Fix issue #13: Segfault on successful retry of server creation.

  • Greatly improved stability under heavy load by ignoring SIGPIPE.
  • Work properly with body=c(file="foo"). Previously this only worked if body was a list, not a character vector.

  • R CMD INSTALL will do git submodule update --init if necessary.

  • When onHeaders() callback returned a body, httpuv was not properly short-circuiting the request.

  • Ignore SIGPIPE permanently. This was still causing crashes under heavy real-world traffic.

  • Make request available on websocket object.
  • Support listening on pipes (Unix domain sockets have been tested, Windows named pipes have not been tested but may work).

  • Fix crash on CentOS 6.4 due to weird interaction with OpenSSL.

  • Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("httpuv")

1.3.5 by Joe Cheng, 5 months ago


https://github.com/rstudio/httpuv


Browse source code at https://github.com/cran/httpuv


Authors: Joe Cheng, Hector Corrada Bravo [ctb], Jeroen Ooms [ctb], Winston Chang [ctb]


Documentation:   PDF Manual  


Task views: Web Technologies and Services


GPL-3 | file LICENSE license


Imports Rcpp, utils

Depends on methods

Linking to Rcpp

System requirements: GNU make


Imported by BrownDog, SocialMediaLab, bea.R, blogdown, boxr, emuR, fiery, ggraptR, issueReporter, jug, opencpu, plumber, rfigshare, routr, servr, shiny, spectrino, switchrGist, tabplotd3, ubeR.

Depended on by Rfacebook, Rlinkedin, webglobe.

Suggested by curl, googleVis, httr, vkR, webshot, webutils.


See at CRAN