Is Socket.IO multithread?

node.js, socket.io

Solution

Nothing in Node.js is multithreaded including any packages available through npm. There is an experimental cluster module available in the core

http://nodejs.org/docs/v0.10.2/api/cluster.html

Problem

I have a `socket.io` server which listens to sockets: ``` io.sockets.on('connection', function(socket){ socket.on('myEvent', function(data){ socket.emit('eventReceived', { status: 1 }); }); }); ``` Is this code working in multithread? if two clients will emit the `myEvent` event, it will work at the same time for both clients? or it will be handled one after the other? Many thanks!

Original source

Related problems