anchor.diff:  ;;; Hook onto normal hunchentoot processing
   ;;;
   ;;; The `:around' specilization of `process-request' will first call
  -;;; the main hunchentoot one, which will call our
  -;;; `handle-request'. That will in turn try to figure out if the
  -;;; client is requesting websockets, handshake and set
  -;;; `+http-switching-protocols+'. It will also eventually reply to the
  -;;; client, but hopefully keep the stream alive. That happens if:
  +;;; the main hunchentoot one, which eventually call our specialization
  +;;; of `acceptor-dispatch-request'. That will in turn try to figure
  +;;; out if the client is requesting websockets, handshake and set
  +;;; `+http-switching-protocols+'. Hunchentoot's `process-request' will
  +;;; also eventually reply to the client but in the stream is kept
  +;;; alive. That happens if:
   ;;;
   ;;; 1. There are suitable "Connection" and "Upgrade" headers and
   ;;;    `websocket-resource' object is found for request.
  
positive.code: (defclass websocket-ssl-acceptor (websocket-acceptor ssl-acceptor) ()
    (:documentation "Special WebSocket SSL acceptor"))
  
  (define-condition websocket-unsupported-version (condition)
    ((version :initarg :version :reader websocket-unsupported-version-of
              :initform (required-argument :version)
              :documentation "Original version argument that is unsupported"))
    (:documentation "Signal for unsupported / unrecognized WebSocket versions"))
  
  (define-condition websocket-illegal-key (condition)
    ((key :initarg :key :reader websocket-illegal-key-of
          :initform (required-argument :key)
          :documentation "Original, spurious key argument"))
    (:documentation "Signalled if client sends erroneous handshake key"))
  
  (define-condition websocket-illegal-frame-type (condition)
    ((type :initarg :type :reader websocket-illegal-frame-type-of
           :initform (required-argument :type)
  
negative.code:   (dotimes (num number)
      (read-byte stream)))
  
  (defun websocket-loop (stream message-handler
                         &optional (version :rfc-6455))
    "Implements the main WebSocket loop for supported protocol
  versions. Framing is handled automatically, MESSAGE-HANDLER ought to
  handle the actual payloads.
  