zeromq.examples: cleanup wuserver example.
parent
0b5458da29
commit
183508b852
|
@ -10,16 +10,18 @@ IN: zeromq.examples.wuserver
|
||||||
ZMQ_PUB <zmq-socket> &dispose
|
ZMQ_PUB <zmq-socket> &dispose
|
||||||
dup "tcp://*:5556" zmq-bind
|
dup "tcp://*:5556" zmq-bind
|
||||||
dup "ipc://weather.ipc" zmq-bind
|
dup "ipc://weather.ipc" zmq-bind
|
||||||
random-generator get now timestamp>unix-time >fixnum seed-random [
|
|
||||||
[ t ] [
|
[
|
||||||
dup
|
dup
|
||||||
100000 random
|
100000 random
|
||||||
215 random 80 -
|
215 random 80 -
|
||||||
50 random 10 +
|
50 random 10 +
|
||||||
"%05d %d %d" sprintf
|
"%05d %d %d" sprintf
|
||||||
>byte-array 0 zmq-send
|
>byte-array 0 zmq-send
|
||||||
] while
|
t
|
||||||
] with-random drop
|
] loop
|
||||||
|
|
||||||
|
drop
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
MAIN: wuserver
|
MAIN: wuserver
|
||||||
|
|
Loading…
Reference in New Issue