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:                           (declare (ignore ig))
                            (handler-case
                                (let ((bytes-written (iolib:send-to (tcp-client-socket client) buffer)))
                                  (when t ; (buffer-drained-p buffer)
                                    (on-drain driver client)))
                              ((or iolib:socket-connection-reset-error isys:ewouldblock isys:epipe) (e)
                                (on-client-error driver client e))))))
  
  ;; TCP server test
  (defclass echo () ())
  (defmethod on-connect ((driver echo) client)
    (format t "~&Client connected."))
  (defmethod on-data ((driver echo) client data)
    (format t "~&Data length: ~S~%" (length data)))
  (defmethod on-disconnect ((driver echo) client)
    (format t "~&Client disconnected: ~S~%" client))
  #+nil(start-listener (make-tcp-server (make-instance 'echo)) :host "127.0.0.1" :port 1337 :external-format :utf8)
  