I am managed to connect to the server however handleRegister never gets trigger.
I
tried to manually connect to the server with html5 WebSocket, i don't
really know what to do with it but this is what i can see from firebug, it's connecting to:
http://127.0.0.1:8080/myserver/info
1) the vertxbus is trying to connect to http://127.0.0.1:8080/myserver/info
2) then it's upgraded to websocket automatically with a URL that is always random ws://
127.0.0.1:8080/myserver/122/abcdefgh/websocketSo, how can I connect to the sockjs underlying websocket url with the normal WebSocket class.
I tried these but they won't work (no reply from server).
new WebSocket('ws://
127.0.0.1:8080/myserver');
new WebSocket('ws://
127.0.0.1:8080/myserver/info');
When I tried the websocket URL which i make it up myself: ws://
127.0.0.1:8080/myserver/122/abcdefgh/websocketI am able to get message 'o' and 'h' where h is the heartbeat.
then
i tried to send the message which vertxbus.js is sending to subscribe
to a channel, the websocket connection will get disconnected
ws.send('{"type":"register","address":"app.mychannel.test"}')
How
can i determine the correct WS url and subsribe to a channel in
standard html5 WebSocket? I m trying to understand how it works so i can
port it to other languages