http2udp

Forwards HTTP requests to UDP sockets.

http2udp

Forwards HTTP requests to UDP sockets.

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.

http2udp is a very basic HTTP server that runs on Node.js and forwards requests to UDP, based on the parameters of the request.

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

MIT