zeromq/libzmq — pull request #452 by hshardeesi (2012-10-29 16:30:15+00:00)
Title: New socket option (ZMQ_ROUTER_RAW_SOCK) for ZMQ_ROUTER sockets

Hi,

I had a requirement to support telnet connection to my application for cli. Instead of writing code for tcp server socket, I decided to make few modifications to zmq and use it instead. Sending pull request for inclusion if it would be useful to others.

With my limited experiments with zmq I made the following modifications and they seem to be working fine for my requirement. May be someone more experienced can review the code changes and provide comments.

Thanks
- Hardeep
P.S. Raised issue - LIBZMQ-457 on zeromq.

===================================================

- Created a new option ZMQ_ROUTER_RAW_SOCK
- Added new raw_encoder and raw_decoder to receive and send messages in raw form to remote client
- Added test case file tests/test_raw_sock.cpp

o To create a raw router sock set the ZMQ_ROUTER_RAW_SOCK option
o ZMQ_MSGMORE flag is ignored for non-id messages
o To terminate a remote connection send id message followed by zero length data message