1 ;;;; This file was originally written by Peter Keller (psilord@cs.wisc.edu)
2 ;;;; and this code is released under the same license as IOLib.
4 (defpackage :iolib.examples
5 (:use
:cl
:iolib
:bordeaux-threads
)
6 (:export
:run-ex1-client
23 (in-package :iolib.examples
)
25 ;;;; This file also contains some simply utilities to help the writing of the
28 ;; The example host:port to which clients connect. Servers often bind to
29 ;; any interface, but listen on this port.
30 (defparameter *host
* "localhost")
31 (defparameter *port
* 9999)
33 ;; A simple, but efficient, queue implementation, used by some examples.
37 (defun enqueue (obj q
)
39 (setf (cdr q
) (setf (car q
) (list obj
)))
40 (setf (cdr (cdr q
)) (list obj
)
41 (cdr q
) (cdr (cdr q
))))
47 (defun empty-queue (q)