본문 바로가기

Programming!

NodeJS Socket.IO Query Parameter 넘기기.


- Client

io.connect('http://localhost:8080?myChannel=eclipse4j');


...


- Server

io.sockets.addListener('connection', function(socket){

console.log(socket.handshake.query.myChannel);