remy/html5demos — Issue #21: Socket close on websocket
Author: Dagda-Esus
Created: 2011-11-05 12:38:19+00:00
State: open

Hello,

I have a problem with websocket, it works with your server, but when i try to reach my server, i get "Socket close"

I have try on node.js 0.5.XX (the last 0.5) and today with the new 0.6) compiled on macOSX (snow leopard)
After, i sync source of html5demo, and the source of the server (witch i put in server/node-websocket-server/

At the first try, i get an error with the url to reach the web-socket exemple page (i modified page.php to reach demos with a GET like "page.php?demo=web-socket")
Here I get a page like : http://html5demos.com/web-socket (with your server)

Next, i try to set up my serv, and i do "node server/custom-echo.js" in a terminal.
Here I get an error with the "ws" var, i add "/server" and i re-try the command
I get : 5 Nov 13:30:09:9945 - Listening for connections on undefined

I modified web-socket.html to reach my server with : conn = new WebSocket('ws://localhost:8001'); and I set the port 8001 in custom-echo.js
with a port scan i get : Open TCP Port:	8001	vcom-tunnel

Now I reload the web-socket exemple page and i get : Socket closed in the frontend
and my terminal say me :

WS: 31695578021 draft75 connection
WS: 31695578021 stateChange: 1 -> 3
WS: 31695578021 stateChange: 3 -> 4
5 Nov 13:35:16:6264 - opened connection: 31695578021
WS: 31695578021 write:
Manager: Attached: (1)
WS: 31695578021 end
WS: 31695578021 stateChange: 4 -> 5
WS: 31695578021 socket closed
WS: 31695578021 stateChange: 5 -> 6
Manager: Detached: (0)

With google chrome i get the socket closed message quickly, with firefox i get that after 120sec (2minutes)

Sorry for my english, i'm french, and i discover node.js with your code ;)

Thank