anchor.diff:  (defmacro defevent (name lambda-list &rest options)
     `(defgeneric ,name ,lambda-list ,@options
                  (:method ,lambda-list (declare (ignore ,@lambda-list)) nil)))
  -(defevent on-listen (server))
  -(defevent on-close (server))
  -(defevent on-error (server error))
  -(defevent on-connect (server client))
  -(defevent on-disconnect (server client))
  -(defevent on-data (server client data))
  -(defevent on-timeout (server client))
  -(defevent on-client-error (server client error))
  -(defevent on-drain (server client))
  +(defevent on-listen (driver))
  +(defevent on-close (driver))
  +(defevent on-error (driver error))
  +(defevent on-connect (driver client))
  +(defevent on-disconnect (driver client))
  +(defevent on-data (driver client data))
  +(defevent on-timeout (driver client))
  +(defevent on-client-error (driver client error))
  +(defevent on-drain (driver client))
   
   (defparameter *max-buffer-size* 16384)
   (defstruct (tcp-client
  
positive.code:                                              1 (iolib:receive-from (tcp-client-socket client) :buffer buffer))))
                                        (when (zerop bytes-read)
                                          (error 'end-of-file))
                                        (on-data server client (subseq buffer 0 bytes-read)))
                                    ((or iolib:socket-connection-reset-error end-of-file) (e)
                                      (on-client-error server client e))))))
  
  (defun stop-reads (server event-base client)
    (declare (ignore server))
    (iolib:remove-fd-handlers event-base (iolib:socket-os-fd (tcp-client-socket client)) :read t))
  
  (defun start-writes (server event-base client &aux (buffer (tcp-client-write-buffer client)))
    ;; TODO - this blows and doesn't work. Make it not blow.
    (iolib:set-io-handler event-base (iolib:socket-os-fd (tcp-client-socket client))
                          :write
  
negative.code:                                              (let ((client (make-client client-sock name port)))
                                                 (setf (gethash (cons name port) connections)
                                                       client)
                                                 (on-connect driver client)
                                                 (start-reads driver event-base client))))))
             (handler-case
                 (iolib:event-dispatch event-base)
               ((or iolib:socket-connection-reset-error iolib:hangup end-of-file) (e)
                 (on-error driver e)))
             (on-close driver))
        (maphash-values (lambda (client) (close (tcp-client-socket client)))
                        connections)
        (close event-base))))
  
  (defun start-reads (driver event-base client)
    (iolib:set-io-handler event-base (iolib:socket-os-fd (tcp-client-socket client))
                          :read (lambda (&rest ig)
                                  (declare (ignore ig))
  