diff --git a/test/testcppzmq.py b/test/testcppzmq.py index def3365..9890f99 100644 --- a/test/testcppzmq.py +++ b/test/testcppzmq.py @@ -1,8 +1,17 @@ import zmq +import time +import sys if __name__ == '__main__': + s = sys.argv[1] ctx = zmq.Context() + sock = ctx.socket(zmq.REQ) + sock.connect('tcp://11.6.1.66:5556') +# time.sleep(1) + sock.send(s.encode()) + print(sock.recv()) + exit(0) sock = ctx.socket(zmq.PULL) sock.bind('tcp://0.0.0.0:5558') while True: s = sock.recv() - print(s) \ No newline at end of file + print(s)