Skip to content

Instantly share code, notes, and snippets.

@leggetter
Created July 1, 2014 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leggetter/ff74dcf5db3efc2cf681 to your computer and use it in GitHub Desktop.
Save leggetter/ff74dcf5db3efc2cf681 to your computer and use it in GitHub Desktop.
Should the following result in so many connections being made to the Socket.IO server?

I'm trying to use Socket.IO with namespaces in order to partition the data. See the following code:

<script src="https://cdn.socket.io/socket.io-1.0.6.js"></script>
<script>
var webglStats = io( '/webgl' );
var videoStats = io( '/video' );
var touchStats = io( '/touch' );
</script>

If I look at the network tab I see the following:

The following document states Socket.IO supports multiplexing: https://github.com/automattic/socket.io-protocol

How does this map from the 3 namespaces to the connections shown in the image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment