Reputation: 15996
I've been using socket.io to create a websocket enabled server in node.js, and its great. Now i'd like however, to create a server-side client in node.js which can connect to a websocket server elsewhere. Are there any libraries out there for this?
Thanks
Upvotes: 14
Views: 11526
Reputation: 5157
I've just been working on a project with similar needs: a Node server that acts as a Socket.io server and connects to another service via proper websockets. I used the ws
module for the websocket client in Node.
Do be aware that, as noted above by Josh, Socket.io is a protocol on top of web sockets.
Upvotes: 1
Reputation: 12722
Not any that are great.
I talked to Guillermo about this on mailing list a couple days ago, see http://groups.google.com/group/socket_io/browse_thread/thread/74e9ff6d7e931f6e
I wrote this as a bootstrap to help in my testing: https://github.com/jmoyers/mettle/blob/master/test/test-socket.coffee#L18-49
Guillermo is working on one here for 0.7: https://github.com/LearnBoost/Socket.IO-node-client
Upvotes: 2
Reputation: 16025
https://github.com/pgriess/node-websocket-client <-- does this one work for you?
Found on this list here: https://github.com/joyent/node/wiki/modules
Upvotes: 4