anchor.diff:      t))
   
   
  -(defun orb-wait ()
  +(defun orb-wait (&optional wait-func &rest wait-args)
  +  (if *running-orb* 
  +    (if wait-func
  +      (loop until (apply wait-func wait-args) do (orb-work))
  +      (orb-work))
  +    (if wait-func
  +      (apply #'process-wait "orb-wait" wait-func wait-args)
  +      (sleep 0.1))))
  +
  +
  +(defun orb-work ()
     (declare (optimize (debug 3)))
  -  ;; Check special shortcut connection
  -  (when (or (shortcut-transfer *shortcut-out* *shortcut-in*)
  -            (shortcut-transfer *shortcut-in* *shortcut-out*))
  -    (return-from orb-wait))
  -
  -  (multiple-value-bind (event desc) (io-driver)
  -    (when event
  -      (mess 2 "io-event: ~S ~A" event (io-descriptor-stream desc)))
  -    (let ((conn (gethash desc *desc-conn*)))
  -      (case event
  -        (:read-ready
  -         ;;(io-descriptor-set-read desc nil 0 0)
  -         (connection-read-ready conn))
  -        (:write-ready
  -         (io-descriptor-set-write desc nil 0 0)
  -         (connection-write-ready conn))
  -        (:new
  -         (funcall *new-connection-callback* desc))
  -        (:connected
  -         ;; Not implemented yet..; for outgoing connections setup
  -         nil)
  -        (:error
  -         (mess 4 "Error: ~A" (io-descriptor-error desc))
  -         (io-descriptor-destroy desc)
  -         (connection-error conn))
  -        ((nil)
  -         (mess 1 "time out"))))))
  +  (or ;; Check special shortcut connection
  +   (shortcut-transfer *shortcut-out* *shortcut-in*)
  +   (shortcut-transfer *shortcut-in* *shortcut-out*)
  +   ;; normal processing
  +   (multiple-value-bind (event desc) (io-driver)
  +     (when event
  +       (mess 2 "io-event: ~S ~A" event (io-descriptor-stream desc)))
  +     (let ((conn (gethash desc *desc-conn*)))
  +       (case event
  +         (:read-ready
  +          ;;(io-descriptor-set-read desc nil 0 0)
  +          (connection-read-ready conn))
  +         (:write-ready
  +          (io-descriptor-set-write desc nil 0 0)
  +          (connection-write-ready conn))
  +         (:new
  +          (funcall *new-connection-callback* desc))
  +         (:connected
  +          ;; Not implemented yet..; for outgoing connections setup
  +          nil)
  +         (:error
  +          (mess 4 "Error: ~A" (io-descriptor-error desc))
  +          (io-descriptor-destroy desc)
  +          (connection-error conn))
  +         ((nil)
  +          (mess 1 "time out")))))))
  +
   
    
  
positive.code:   (setf (connection-write-buffer conn) nil))
  
  (defun connection-send-buffer (conn buffer)
    (loop while (connection-write-buffer conn)
          do (orb-wait))
    (setf (connection-write-buffer conn) buffer)
    (setf (connection-write-callback conn) #'write-done)
    (let ((desc (connection-io-descriptor conn))
  
negative.code:       req)))
  
  (defun request-wait-response (req)
    (orb-wait #'request-status req))
  
  
  