anchor.diff:    character)
   
   (defmethod close ((stream tcp-stream) &key abort)
  -  (let* ((connection (tcp-stream-connection stream)))
  -    (setf (tcp-connection-state connection) :closing)
  -    (tcp4-send-packet connection
  -                      (tcp-connection-s-next connection)
  -                      (tcp-connection-r-next connection)
  -                      nil
  -                      :fin-p t)))
  +  (close-tcp-connection (tcp-stream-connection stream)))
   
   (defun tcp-stream-connect (address port)
     (make-instance 'tcp-stream :connection (tcp-connect (sys.net::resolve-address address) port)))
  
positive.code:        (format t "Establishing TCP connection. l ~D  r ~D  from ~X.~%" local-port remote-port remote-ip)
         (let* ((seq (ub32ref/be packet (+ start +tcp4-header-sequence-number+)))
                (blah (random #x100000000))
                (connection (make-tcp-connection :state :syn-received
                                                 :local-port local-port
                                                 :remote-port remote-port
                                                 :remote-ip remote-ip
  
negative.code:   rx-data
    (lock (mezzano.supervisor:make-mutex "TCP connection lock"))
    (cvar (mezzano.supervisor:make-condition-variable "TCP connection cvar")))
  
  (declaim (inline tcp-connection-state (setf tcp-connection-state)))
  
  (defun tcp-connection-state (connection)
    (tcp-connection-%state connection))
  
  (defun (setf tcp-connection-state) (value connection)
    ;(format t "~S ~S => ~S~%" connection (tcp-connection-%state connection) value)
    (setf (tcp-connection-%state connection) value))
  
  (defmacro with-tcp-connection-locked (connection &body body)
    `(mezzano.supervisor:with-mutex ((tcp-connection-lock ,connection))
  