anchor.diff:  (defvar *io-descriptions* nil
     "List of all io-descriptors that we will do I/O on.")
   
  +(defvar *io-work-pending* nil)
   
   
   ;;;; Event Queue
  
positive.code: ;;;; Shortcut stream
  
  
  (defclass octets-stream ()
    ((buffer  :initform nil  :accessor octets-stream-buffer)))
  
  (defclass shortcut-stream ()
    ((output  :initarg :output  :accessor shortcut-stream-output)
     (input   :initarg :input   :accessor shortcut-stream-input )))
  
  
  (defun io-ostream-write (octets-stream seq start end)
    (with-accessors ((buffer octets-stream-buffer)) octets-stream
      (setf buffer (concatenate 'octets buffer (subseq seq start end)))))
  
  (defun io-ostream-read (octets-stream seq start end)
    (let ((len (- end start)))
      (with-accessors ((buffer octets-stream-buffer)) octets-stream
        (unless (> len (length buffer))
          (replace seq buffer :start1 start :end1 end :start2 0 :end2 len)
          (setf buffer (subseq buffer len))
          t))))
  
  
  (defun io-shortcut-write (shortcut-stream seq start end)
    (io-ostream-write (shortcut-stream-output shortcut-stream) seq start end))
  
  (defun io-shortcut-read (shortcut-stream seq start end)
    (io-ostream-read (shortcut-stream-input shortcut-stream) seq start end))
  
  
  (defun io-descriptor-shortcut-connect (desc)
    (let ((i-stream (make-instance 'octets-stream))
          (o-stream (make-instance 'octets-stream)))
      (let ((other (make-io-descriptor
                    :stream (make-instance 'shortcut-stream :input o-stream :output i-stream)
                    :status :connected
                    :shortcut-p desc)))
        (push other *io-descriptions*)
        (io-queue-event :new other)
        (setf (io-descriptor-stream desc) (make-instance 'shortcut-stream :input i-stream :output o-stream))
        (setf (io-descriptor-shortcut-p desc) other))))
  
  
  
negative.code: ;;;; clorb-io.lisp  --  a reactive IO layer for CLORB
  ;; $Id: clorb-io.lisp,v 1.24 2004/02/08 14:32:43 lenst Exp $
  
  
  ;; io-reset ()
  