0.0.6 • Published 10 years ago

unix2ws v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Unix2WS.js

Unix2WS allows you to easily stream data from any input to socket.io.

This tool supports TCP, UNIX sockets as input, or named-pipe (FIFO)

Installation

Usage

The command line tool unix2ws opens a socket.io server. Any content received through the specified source will be sent to all the Socket.IO clients.

I created this tool to be able to easily stream any line by line output from a command-line application to the browser.

By default, unix2ws will try to parse every line received as a JSON object.

Example

Open the example HTML file in your browser and give it a try, you'll see it's pretty simple

Limitations

  • It's at the moment impossible to create Unix FIFOs from node (See this message on stackoverlow), I create it in a nasty way at the moment
  • UNIX sockets & UNIX FIFOs are, of course, not supported on windows

TODO

I'll probably add the following features in a near future:

  • New parameter --event to specify the event name used to propagate the data (which is "data" at the moment)
  • I'd like to add a new feature allowing me to give a node.js script as parameter, this script would expose a function receiving the socket object. I could therefore define (or reuse) some backend-side code (handshake, authentication, ...)
  • I have a lot of other ideas, but at the same time I think it would be cool to keep that tool simple and light
0.0.6

10 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2-b

11 years ago

0.0.2

11 years ago