I\'m trying to implement a system with two clients one of them sends a message and the other one shall receive it. The figure below will explain it in a more visual way:
Another aspect which you could take into consideration is the use of :
socket.broadcast.emit('push', { hello: 'world' });
Which would essentially send the message to all the connected clients except the one that originated the message. Removing the task of filtering clients/reducing unnecessary traffic to the originating socket.
Socket.IO on GitHub - Under broadcasting.