anchor.diff:  ;;; you do please feel free to submit a patch.
   (defmethod xml-element-to-event ((connection connection)
   				 (object xml-element) (name (eql :message)))
  -  (cond
  -   ((get-invitation object)
  -    (make-invitation object))
  -   (t
  -    (make-message object))))
  -
  +  (make-instance 'message
  +                 :xml-element object
  +		 :from (value (get-attribute object :from))
  +		 :to (value (get-attribute object :to))
  +                 :id (value (get-attribute object :id))
  +                 :type (value (get-attribute object :type))
  +		 :body (if (get-element object :body)
  +			   (data (get-element (get-element object :body) :\#text))
  +			   "nil")))
  +
  +(defmethod stanza-waiting-p ((connection connection))
  +  "listens into the socket stream and checks whether stanzas have arrived"
  +  (listen (usocket:socket-stream (server-socket connection))))
   
   ;;
   ;; Receive stanzas
   ;;
   
  -(defmethod stop-stanza-loop ((connection connection))
  -  (setf (stanza-thread connection) nil))
  -
  -(defmethod receive-stanza-loop ((connection connection)
  -                                &key stanza-callback dom-repr)
  +(defmethod receive-stanza-loop ((connection connection)	&key
  +                                (stanza-callback 'default-stanza-callback)
  +                                dom-repr)
     "Reads from connection's stream and parses the XML received
   on-the-go.  As soon as it has a complete element it calls
   the stanza-callback (which by default eventually dispatches
   to HANDLE)."
  -  (setf (stanza-thread connection) t)
  -  (unwind-protect
  -      (loop while (stanza-thread connection)
  -          do (receive-stanza connection
  +  (loop (receive-stanza connection
   			:stanza-callback stanza-callback
  -                             :dom-repr        dom-repr))
  -    (setf (stanza-thread connection) nil)))
  -
  -
  -(defmethod receive-stanza ((connection connection)
  -                           &key stanza-callback dom-repr)
  +			:dom-repr dom-repr)))
  +
  +(defmethod receive-stanza ((connection connection) &key
  +			   (stanza-callback 'default-stanza-callback)
  +			   dom-repr)
     "Returns one stanza.  Hangs until one is received."
  -  (handler-case
  -      (let ((stanza   (read-stanza connection))
  -            (callback (or stanza-callback (stanza-callback connection))))
  -        (when callback
  -          (car (funcall callback stanza connection :dom-repr dom-repr))))
  -    ;; Catch the cxml well-formedness-violation and propagate it through as
  -    ;; a server-disconnection.   Perhaps this should be a handler bind and
  -    ;; should only propagate when the cxml error has :EOF in it...
  -    (cxml:well-formedness-violation (condition)
  -      (error 'server-disconnect
  -             :format-control (princ-to-string condition)))))
  -
  +  (let* ((stanza (read-stanza connection))
  +	 (tagname (dom:tag-name (dom:document-element stanza))))
  +    (cond
  +     ((equal tagname "stream:error")
  +      (when stanza-callback
  +	(car (funcall stanza-callback stanza connection :dom-repr dom-repr)))
  +      (error "Received error."))
  +     (t
  +      (when stanza-callback
  +	(car (funcall stanza-callback stanza connection :dom-repr dom-repr)))))))
   
   (defun read-stanza (connection)
     (unless (server-source connection)
  
positive.code: 	(t 
  	 (case type
  	   (:get (warn "Don't know how to handle IQ get yet."))
             (:result 
              ;; assuming a simple result (no query)
              (make-simple-result object))
  	   (t
  	    (cond
               ((member id '(:info1 :info2 :info3))
  	      (make-disco-info (get-element object :query)))
               ((member id '(:items1 :items2 :items3 :items4))
  	      (make-disco-items (get-element object :query)))
  	     (t ;; Assuming an error
                (make-error object))))))))))
  
  (defmethod xml-element-to-event ((connection connection)
  				 (object xml-element) (name (eql :error)))
  
negative.code:    (port
      :accessor port
      :initarg :port
      :initform *default-port*))
    (:documentation "A TCP connection between this XMPP client and
  an, assumed, XMPP compliant server.  The connection does not
  know whether or not the XML stream has been initiated nor whether
  