You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I think this is a pretty awesome package! Thanks for all your great work on it!
Apologies if I misunderstand something, I've just started working with Snap and websockets.
I'm trying to setup a basic web sockets connection with SSL. I found your other project https://github.com/jaspervdj/websockets-snap, and tried to modify it to support this pattern. For the most part it works, but fails on disconnects, when the user closes the browser.
The client code is no different from your example except for an additional line with "wss".
I spent quite some time trying to fix it myself, but unsuccessfully. It doesn't seem to be an issue with the browser, as I verified with the command "tcpdump -i lo0 port 9160", and chrome is sending disconnects when the browser is closed, both for regular http and https (secure websockets).
I'm still struggling to understand what escapeHttp does and how it works. When it says "escapes all http traffic", does that mean it drops any incoming http packets?
This might be an issue with snap-server, but given the fact it is correctly closing https and http traffic correctly, I thought it might be more appropriate to list the issue here.
Please let me know if I can help in any way, or there is any clarification required.
The text was updated successfully, but these errors were encountered:
Patience and studying the snap debug log files. However, I talked with Gregory and this patch is unlikely to be applied for now, since it actual is an exception. So, I basically need to find some better way of detecting a disconnect, which I haven't been able to wrap my head around yet.
First off, I think this is a pretty awesome package! Thanks for all your great work on it!
Apologies if I misunderstand something, I've just started working with Snap and websockets.
I'm trying to setup a basic web sockets connection with SSL. I found your other project https://github.com/jaspervdj/websockets-snap, and tried to modify it to support this pattern. For the most part it works, but fails on disconnects, when the user closes the browser.
The Server code is here: https://gist.github.com/1709572
The Client Javascript code is here: https://gist.github.com/1709573
To generate a certificate: https://gist.github.com/1709595
The client code is no different from your example except for an additional line with "wss".
I spent quite some time trying to fix it myself, but unsuccessfully. It doesn't seem to be an issue with the browser, as I verified with the command "tcpdump -i lo0 port 9160", and chrome is sending disconnects when the browser is closed, both for regular http and https (secure websockets).
I also did some digging into the Snap source but it is successfully getting the disconnects and shutting down the sockets appropriately (tested lines 40-41 of https://github.com/snapframework/snap-server/blob/master/src/Snap/Internal/Http/Server/ListenHelpers.hs).
I'm still struggling to understand what escapeHttp does and how it works. When it says "escapes all http traffic", does that mean it drops any incoming http packets?
This might be an issue with snap-server, but given the fact it is correctly closing https and http traffic correctly, I thought it might be more appropriate to list the issue here.
Please let me know if I can help in any way, or there is any clarification required.
The text was updated successfully, but these errors were encountered: