import zmq

def monitorclient(server_url="tcp://localhost:7777"):
    context = zmq.Context()
    socket = context.socket(zmq.SUB)
    socket.connect(server_url)
    socket.setsockopt(zmq.SUBSCRIBE, "")
    print("started monitoring client")

    while True:
        res = socket.recv_multipart()
        print(res)

if __name__ == "__main__":
    monitorclient()
