Refactored code so that zmq parent gets passed to zmtp_socket_open