http2udp
v0.3.4
Published
Forwards HTTP requests to UDP sockets.
Downloads
7
Readme
http2udp
Forwards HTTP requests to UDP sockets.
- What's the point?
- How does it work?
- How do I install it?
- How do I use it?
- How do I set up the build environment?
- What license is it released under?
What's the point?
At the time of writing, there is no way to send UDP packets from client-side JavaScript running in a web browser.
There may be other use cases for browser-based UDP but, for me, it is in order to send client-side RUM data to statsd, a popular monitoring server that receives data via UDP. UDP is a common choice for monitoring servers, where the issues of dropped packets and preserving transmission order are typically of little or no concern.
How does it work?
http2udp is a very basic HTTP server that runs on Node.js and forwards requests to UDP, based on the parameters of the request.
How do I install it?
Assuming that you already have Node.js and npm, you can install it globally like so:
sudo npm install -g http2udp
Or add it to your project's dependencies
in package.json
and run:
npm install