Hi Hossein, > How can I close the connection on client and server after my work is > done? Will connection go to TIME_WAIT or ESTABLISHED state and not be > closed immediately? Just close the socket. > How can I set timeout for recv? Use zmq_poll. It has timeout argument. Martin