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
Created a new socket option ZMQ_ROUTER_RAW_SOCK for router socket.
Added new raw_encoder and raw_decoder to send and receive messages in raw form from tcp client
Added test case file tests/test_raw_sock.cpp
o To create a raw router sock set the ZMQ_ROUTER_RAW_SOCK socket option
o ZMQ_MSGMORE flag is ignored for non-id messages sent on raw socket
o A tcp connection can be closed by sending zmq id message followed by zero length data message
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
o To create a raw router sock set the ZMQ_ROUTER_RAW_SOCK socket option o ZMQ_MSGMORE flag is ignored for non-id messages sent on raw socket o A tcp connection can be closed by sending zmq id message followed by zero length data message