sustrik at 250bpm.com
Tue May 3 17:17:14 CEST 2011
Given that there was a strong desire to have subports (multiple 0MQ
sockets communicating via same TCP port) implemented I've spent couple
of days on the problem.
It turns out that due to constraints of BSD socket API the functionality
can be implemtented only in a very limited way:
All the sockets sharing the port have to be in a single process. There's
no way to coexist with another process using the same port even though
it is using different NIC, there's no way to use a specific NIC at all etc.
The only systematic solution would be to have a special daemon process
that would listen on a specific port and pass new connection (via IPC)
to the libzmq instance that have registered for the relevant subport.
The question is whether such a solution is in any way better than simply
using different TCP ports for different 0MQ sockets.
More information about the zeromq-dev