All,
I am trying to write a simple client/server program using
sb-bsd-sockets but I am experiencing deadlock. I am calling
(finish-output) on the stream after each write. The test program is
attached. My program has the following semantics:
Server:
1. Create socket
2. Bind to 127.0.0.1:8675
3. Listen, Accept
4. Read from the client (blocking)
5. Write to the client
6. Cleanup
Client:
1. Create socket
2. Connect to 127.0.0.1:8675
3. Write to the server
4. Read from the server (blocking)
5. Cleanup
I have tested on the following machines:
Machine 1: SBCL 1.0.57, CentOS release 6.2 (Final), Linux
2.6.32-220.17.1.el6.x86_64
Machine 2: SBCL 1.0.38-3.el6, CentOS release 6.3 (Final), Linux
2.6.32-279.1.1.el6.x86_64
I receive the following output:
Server:
$ sbcl --noinform --no-userinit --no-sysinit --load test.lisp --eval
'(server-test :full)'
connected.
Client:
$ sbcl --noinform --no-userinit --no-sysinit --load test.lisp --eval
'(client-test :full)'
connected.
wrote: (10 9 8 Z Y X)
Thank you all,
Nick Mills
|