tj / axon

message-oriented socket library for node.js heavily inspired by zeromq
MIT License
1.5k stars 155 forks source link

Can Axon be used in client (through browserify) with websockets instead of node's 'net' module? #116

Closed tkafka closed 10 years ago

tkafka commented 10 years ago

I tried it, but didn't find any replacement for 'net' module. Did I miss some easier way to use axon in browser? Thanks!

gjohnson commented 10 years ago

Nope. Never used browserify though, so not sure where to point you. Sorry!

tkafka commented 10 years ago

Ok, thanks for answer. Seems like rewriting net module for websockets is more than trivial change.

rlidwka commented 10 years ago

Seems like rewriting net module for websockets is more than trivial change.

Implementing 'net'-like shim for client-server communication over websockets is trivial.

You can even implement a complete 'net' module, but it'll require an intermediate WS-capable server, i.e. won't work with unmodified existing tcp servers.

But implementing an independent 'net' module in browser is impossible, because there is no way to make a direct TCP/UDP/SCTP connection from it (except for flash maybe?). That's why you won't find any complete implementation for browserify out there.