summary refs log tree commit diff stats
path: root/examples/0mq/client.nim
blob: e75e5c7a2d8b7b8d98c92df0e34b732a6bc93c0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import zmq

var connection = zmq.open("tcp://localhost:5555", server=false)

echo("Connecting...")

for i in 0..10:
  echo("Sending hello...", i)
  send(connection, "Hello")
  
  var reply = receive(connection)
  echo("Received ...", reply)

close(connection)