Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • The logic needs to run in a separate thread that handles client requests. Put client requests from your socket.on method into a message queue and your server chooses when to process the message(s). You'll probably need to keep that client socket open to have the server send a response at its time of choosing. The reason for that is that some networks will block connections initiated from the outside unless those connections are opened by the network admin. So, you probably won't see this on your LAN, but if you move to a WAN that's when your design may need a rewrite without considering this. Commented Apr 21, 2014 at 15:46