anchor.diff:      (close server)))
   
   (defmethod close ((server tcp-server) &key abort)
  -  (on-close (server-driver server))
     (maphash-values (rcurry #'close :abort abort) (server-connections server))
  -  (close (server-event-base server)))
  +  (close (server-event-base server))
  +  (on-close (server-driver server)))
   
   (defun start-reads (server client &aux (driver (server-driver server)))
     (iolib:set-io-handler (server-event-base server) (iolib:socket-os-fd (client-socket client))
  
positive.code: (defmethod stream-write-string ((client tcp-client) string &optional start end)
    (stream-write-sequence client string start end))
  (defmethod close ((client tcp-client) &key abort)
    (close (client-socket client) :abort abort)
    (remhash client (server-connections (client-server client))))
  
  ;; TCP server test
  (defclass echo () ())
  (defmethod on-connect ((driver echo) client)
    (format t "~&Client connected.")
    (format client "~&Welcome. Everything you say will be echoed back to you now.~%"))
  (defmethod on-data ((driver echo) client data)
    (format t "~&Data length: ~S~%" (length data))
    (write-sequence data client))
  (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)
  
negative.code:   `(defgeneric ,name ,lambda-list ,@options
                 (:method ,lambda-list (declare (ignore ,@lambda-list)) nil)))
  (defevent on-listen (driver))
  (defevent on-error (driver error))
  (defevent on-connect (driver client))
  (defevent on-close (driver))
  (defevent on-data (driver client data))
  (defevent on-timeout (driver client))
  (defevent on-client-error (driver client error))
  (defevent on-client-close (driver client))
  (defevent on-drain (driver client))
  
  (defun make-queue () (cons nil nil))
  