I have an application listening on port using net.createServer and socket.io on other port.
net.createServer has many clients connected. After receiving command from browser via socket.io I need to coordinate work of two net.createServer clients. So I send command over first socket to first client and I need to proceed further only when it replays. But how do I save my current scope? Any way to keep “this”?
UPDATE1:
Here is a basic example
The solution to save “this” scope is to use bind(this) on a function definition