Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/pyzmq/patterns/code/pairclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
socket.connect("tcp://localhost:%s" % port)

while True:
msg = socket.recv()
print msg
socket.send("client message to server1")
socket.send("client message to server2")
msg = socket.recv_string()
print(msg)
socket.send_string("client message to server1")
socket.send_string("client message to server2")
time.sleep(1)
6 changes: 3 additions & 3 deletions source/pyzmq/patterns/code/pairserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
socket.bind("tcp://*:%s" % port)

while True:
socket.send("Server message to client3")
msg = socket.recv()
print msg
socket.send_string("Server message to client3")
msg = socket.recv_string()
print(msg)
time.sleep(1)