If I get a socket descriptor, can I read data through a different socket object if I have assigned the file descriptor to it?
void *zmq_ctx = zmq_ctx_new ();
void *zmq_sock_ = zmq_socket (zmq_ctx, ZMQ_REQ);
int zfd;
size_t optlen = sizeof (zfd);
zmq_getsockopt (zmq_sock_, ZMQ_FD, &zfd, &optlen);
sock.assign (boost::asio::ip::tcp::v4(), zfd);
int rc = zmq_connect (zmq_sock_,"tcp://localhost:4040");
Can I read data from such a sock-object of boost::asio
, rather than ZeroMQ once I have assigned the fd
to a boost
socket-object