1 ! Copyright (C) 2012 Eungju PARK.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: byte-arrays calendar destructors io kernel strings
4 threads zeromq zeromq.ffi ;
5 IN: zeromq.examples.hwserver
10 ZMQ_REP <zmq-socket> &dispose
11 dup "tcp://*:5555" zmq-bind
14 [ 0 zmq-recv >string "Received " write print flush ]
15 [ drop 1 seconds sleep ]
16 [ "World" >byte-array 0 zmq-send ]