[zeromq-dev] Forcefully drop a peer connection
Martin Sustrik
sustrik at 250bpm.com
Sun Jul 17 23:46:32 CEST 2011
On 07/17/2011 08:50 PM, Mike Owens wrote:
>> There's a plan to create a new low-level socket type in the future that
>> would replace ROUTER and allow to circumvent the messaging patterns and use
>> 0mq as a dumb networking framework. You can help with the work, if you are
>> interested.
Ok. There's an initial version of the functionality on pre40 branch.
It's a socket type called ZMQ_GENERIC.
It works much in the same way as ROUTER -- it labels each incoming
message by an opaque ID of the connection. Also, when sending a message
to GENERIC socket, you should label it by the ID of the connection you
want to send it to.
In addition, GENERIC socket provides notifications about connections and
disconnections. To distinguish notifications from common inbound
messages, new COMMAND flag was introduced. You can retrieve it using
ZMQ_RCVCMD socket option.
Command is either a connection notification (byte 0x01 followed by new
connection ID) or disconnection notification (byte 0x02 followed by ID
of the terminated connection).
Comments are welcome.
Martin
More information about the zeromq-dev
mailing list