Frage

I am experiencing problems using socket.io from within certain networks.

The demo page and node server I am using to test this are originally found here and here. It is a simple chat client provided by socket.io.

When a user accesses this demo page on my server from within certain closed networks such as an office or university, the user connects and disconnects repeatedly until it finally drops the connection. The output from Node.js during this is:

3 May 07:50:41 - Initializing client with transport "jsonp-polling"
3 May 07:50:41 - Client 16640139906667173 connected
3 May 07:50:41 - Initializing client with transport "jsonp-polling"
3 May 07:50:41 - Client 6106549079995602 connected
3 May 07:50:41 - Initializing client with transport "jsonp-polling"
3 May 07:50:41 - Client 8987158865202218 connected
3 May 07:50:42 - Initializing client with transport "jsonp-polling"
3 May 07:50:49 - Client 16640139906667173 disconnected
3 May 07:50:49 - Client 8987158865202218 disconnected
3 May 07:50:49 - Client 6106549079995602 disconnected

This continues until the browser gives up and permanently drops the connection.

Has anyone experienced similar issues before? What could cause socket.io to fail from within specific networks?

Thank you.

War es hilfreich?

Lösung

Some office/university networks filter out ports above the well-known port threshold (1024+). This prevents users from using P2P software (which includes 8080) and provides a less clogged network. I would suggest changing the chat client port to something within that range or something well known, possibly 81-90 would be my choice.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top