1 ! Copyright (C) 2013 John Benediktsson.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: byte-arrays calendar destructors io kernel present strings
4 threads zeromq zeromq.ffi ;
5 IN: zeromq.examples.echo-client
10 ZMQ_REQ <zmq-socket> &dispose
11 dup "tcp://127.0.0.1:5000" zmq-connect
14 [ "Sending " write print flush ]
15 [ >byte-array dupd 0 zmq-send ] bi
16 dup 0 zmq-recv >string
17 "Received " write print flush