ADDED testzmq/hwclient.scm Index: testzmq/hwclient.scm ================================================================== --- /dev/null +++ testzmq/hwclient.scm @@ -0,0 +1,16 @@ +(use zmq posix) + +(define s (make-socket 'req)) +(connect-socket s "tcp://127.0.0.1:5563") + +(define myname (cadr (argv))) + +(print "Start client...") + +(do ((i 0 (+ i 1))) + ((>= i 1000)) + (print "sending message #" i) + (send-message s (conc "Hello from " myname)) + (print "sent \"Hello\", looking for a reply") + (printf "Received reply ~a [~a]\n" + i (receive-message s))) ADDED testzmq/hwserver.scm Index: testzmq/hwserver.scm ================================================================== --- /dev/null +++ testzmq/hwserver.scm @@ -0,0 +1,15 @@ +(use zmq srfi-18 posix) + +(define s (make-socket 'rep)) +(bind-socket s "tcp://127.0.0.1:5563") + +(print "Start server...") +(let loop () + (let* ((msg (receive-message s)) + (name (caddr (string-split msg " "))) + (resp (conc "World " name))) + (print "Received request: [" msg "]") + (thread-sleep! 0.01) + (print "Sending response \"" resp "\"") + (send-message s resp) + (loop))) ADDED testzmq/hwtest.sh Index: testzmq/hwtest.sh ================================================================== --- /dev/null +++ testzmq/hwtest.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo Compiling hwclient and hwserver +csc hwclient.scm +csc hwserver.scm + +./hwserver & +sleep 1 +for x in a b c d e f g h i j k l m n o p q r s t u v w x y z;do +./hwclient $x & +done + +# killall -v hwserver hwclient Index: utils/installall.sh ================================================================== --- utils/installall.sh +++ utils/installall.sh @@ -148,11 +148,12 @@ make install cd $BUILDHOME export CSCLIBS=`echo $LD_LIBRARY_PATH | sed 's/:/ -L/g'` -CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" chicken-install $PROX -D no-library-checks iup:1.0.2 +CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" chicken-install $PROX -D no-library-checks -feature disable-iup-web iup +# iup:1.0.2 CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" chicken-install $PROX -D no-library-checks canvas-draw # http://download.zeromq.org/zeromq-2.2.0.tar.gz ZEROMQ=zeromq-2.2.0 if ! [[ -e ${ZEROMQ}.tar.gz ]] ; then