josephg / ShareJS

Collaborative editing in any app
Other
4.97k stars 456 forks source link

using sockjs on node client not possible #122

Open dcolens opened 12 years ago

dcolens commented 12 years ago

it is not possible to start a node client to connect to a share server running sockjs, a simple patch would be to define sockjs in connection.coffee, a better solution would be to pass the transport option when creating the client.

wmertens commented 12 years ago

This ties into the discussion at #116, about how to pass options to share that pertain to multiple open() calls.

Furthermore the current sockjs/browserchannel selection code is pretty error-prone. What would be a good way to select the transport to use?

How about, if no preference is set, first try browserchannel and then try sockjs? If a preference is set, fail if the transport is not available.

For making sockjs work on the client side, at the very least the Connection will have to require "sockjs-client".

dcolens commented 11 years ago

Agreed, what about :