On 23/05/15 00:30, tsuna wrote:
> What I’m asking for a is for a pure-WebSocket EventBus bridge endpoint
> that doesn’t require dealing with the small SockJS layer.
>
> SockJS only makes sense for browsers. Non-browser clients shouldn’t
> have to deal with the SockJS stuff. It creates friction to tell all
> our users “you can connect to this WebSocket endpoint, but it’s
> actually a SockJS endpoint, so you need to go through this little
> SockJS dance to get things going”.
What dance are you referring to? SockJS comes with a standard protocol
called raw websocket - which is exactly that, it allows you to connect
with a raw websocket. No dance required. Your clients don't need to know
that they're connecting to a SockJS endpoint.
Did you take a look at the link to the tests in my last reply, they
demonstrate this:
https://github.com/vert-x3/vertx-web/blob/master/src/test/java/io/vertx/ext/web/handler/EventbusBridgeTest.java#L988
As you can see we're creating a completely standard web socket
connection (no SockJS) on the client side and connecting to a server...
that's it. And this should work with any SockJS server which has the raw
websocket transport enabled:
There's some more info here:
https://github.com/sockjs/sockjs-client "Connecting to SockJS without
the client"