anchor.diff:                                     (subseq data start end))
                                  :psh-p t))))))))
   
  +(defclass tcp-octet-stream (sys.gray:fundamental-binary-input-stream
  +                            sys.gray:fundamental-binary-output-stream)
  +  ((connection :initarg :connection :reader tcp-stream-connection)
  +   (current-packet :initform nil :accessor tcp-stream-packet)))
  +
   (defclass tcp-stream (sys.gray:fundamental-character-input-stream
                         sys.gray:fundamental-character-output-stream
  -                      sys.gray:fundamental-binary-input-stream
  -                      sys.gray:fundamental-binary-output-stream
  +                      tcp-octet-stream
                         sys.gray:unread-char-mixin)
  -  ((connection :initarg :connection :reader tcp-stream-connection)
  -   (current-packet :initform nil :accessor tcp-stream-packet)))
  +  ())
   
   (defun refill-tcp-stream-buffer (stream)
     (let ((connection (tcp-stream-connection stream)))
  
positive.code:     (refill-tcp-stream-buffer stream)
      (not (null (tcp-stream-packet stream)))))
  
  (defmethod sys.gray:stream-read-byte ((stream tcp-stream))
    (with-tcp-connection-locked (tcp-stream-connection stream)
      (when (not (refill-tcp-packet-buffer stream))
        (return-from sys.gray:stream-read-byte :eof))
  
negative.code:           #\REPLACEMENT_CHARACTER
            (code-char code-point)))))
  
  (defmethod sys.gray:stream-write-byte ((stream tcp-octet-stream) byte)
    (let ((ary (make-array 1 :element-type '(unsigned-byte 8)
                           :initial-element byte)))
      (tcp-send (tcp-stream-connection stream) ary)))
  
  (defmethod sys.gray:stream-write-sequence ((stream tcp-octet-stream) sequence &optional (start 0) end)
    (unless end (setf end (length sequence)))
    (cond ((not (and (zerop start)
                     (eql end (length sequence))))
           (setf sequence (subseq sequence start end))))
    (tcp-send (tcp-stream-connection stream) sequence))
  
  (defmethod sys.gray:stream-write-sequence ((stream tcp-stream) sequence &optional (start 0) end)
    (unless end (setf end (length sequence)))
  