zmq server, refactor support