jeudi 2 octobre 2014

Socket.Io: Choose Where to Connect


Vote count:

0




My application is hosted on Nodejitsu and uses multiple drones/servers.


According to the Nodejitsu documentation, I can target a specific drone via the http header


'x-drone':1 where 1 is the drone number.


On client side, it looks something like this: (I think this is how it's supposed to be. I can't test it because I don't have multiple drones yet.)



$.ajax({
url: '/path',
headers: { 'x-drone': 1 }
});


Is there a way to establish a socket.io connection to a specific drone?


Right now, this is what I have on client side (but it connects to least busy drone):



<script src="/http://ift.tt/1aeIZU4"></script>
var socket = io(); //version 1.0


I searched in the documentation about io() for options parameter but couldn't find anything.



asked 1 min ago







Socket.Io: Choose Where to Connect

Aucun commentaire:

Enregistrer un commentaire