WebSockets
Added by Anonymous over 13 years ago
Hello,
I am trying the websockets with a simple application : refresh a date from the server. The "long polling" version works fine : a POST message is send by the client and the date is received after the update delay. The "websockets" configuration behaves strangely (in my opinion...) : a request to "ws://127.0.0.1:8080/[...]" is sent and the communication seems established but POST requests continue to flow at the refresh rate.
Can somebody explain my why "long polling" is used even after the websocket was opened ? Where is the flaw in my understanding of this process ?
For the configuration, I follow the http://redmine.webtoolkit.eu/boards/2/topics/308 and http://redmine.webtoolkit.eu/boards/1/topics/1820 topics. I use Chrome for my experiments.
Thanks.
Replies (5)
RE: WebSockets - Added by Koen Deforche over 13 years ago
Hey Arnaud,
WebSockets is still a draft. We implement one of the earlier drafts, while some browsers recently migrated to a new (incompatible) draft.
What happens is that the client tries to open a WebSocket connection, but fails (because the server does not respond in the expected way). On failure, the client will fall-back to POST requests.
Upgrading our WebSockets implementation is on our TODO list.
Regars,
koen
RE: WebSockets - Added by Anonymous over 13 years ago
Thanks Koen for your quick response,
During the test with Chrome, the websocket seemed to stay open. I hoped for misconfiguration from me...
Is there a web browser which I can use to test the websockets ?
Thanks.
RE: WebSockets - Added by Koen Deforche over 13 years ago
Hey,
I've got a chrome that still does it (10.0.648.127) and also the
latest Safari still works.
More recent versions of Chrome have upgraded to a more recent version
of WebSockets.
See also: http://en.wikipedia.org/wiki/WebSocket
Wt implements draft-76.
Regards,
koen
RE: WebSockets - Added by Koen Deforche over 13 years ago
Hey,
We've slated an upgraded WebSockets protocol support for inclusion in the next version.
It seems that they've stabilized the protocol and are planning a final RFC shortly.
Regards,
koen
RE: WebSockets - Added by Anonymous over 13 years ago
Hello Koen,
Great news; I can't wait to test the next release!
Note : I test the current release with Safari/Ipad, the Websockets work but not with Safari/Windows.