anchor.diff:  
   (defmethod socket-close ((usocket usocket))
     (with-mapped-conditions (usocket)
  -    (ext:socket-close (socket usocket))))
  +    (jdi:do-method (socket usocket) "close")))
   
   ;; Socket streams are different objects than
   ;; socket streams. Closing the stream flushes
  
positive.code:           (t
             "java.nio.channels.DatagramChannel"))))
  
  (defun wait-for-input-internal (sockets &key timeout)
    (let* ((ops (logior (op-read) (op-accept)))
           (selector (jdi:do-jstatic "java.nio.channels.Selector" "open"))
           (channels
            (mapcar #'(lambda (s)
                        (jdi:jcoerce (jdi:do-jmethod-call (socket s) "getChannel")
                                     "java.nio.channels.SocketChannel"))
                    sockets)))
      (unwind-protect
         (with-mapped-conditions ()
            (let ((jfalse (jdi:jcoerce nil :boolean)))
              (dolist (channel channels)
                (jdi:do-jmethod channel "configureBlocking" jfalse)
                (jdi:do-jmethod channel "register"
                                selector
                                (jdi:jcoerce (logand ops (valid-ops channel))
                                             :int))))
            (let ((ready-count
                   (jdi:do-jmethod selector "select" (jdi:jcoerce
                                                      (truncate (* timeout 1000))
                                                      :long))))
              (when (< 0 ready-count)
                ;; we actually have work to do
                (let* ((selkeys (jdi:do-jmethod selector "selectedKeys"))
                       (selkey-iterator (jdi:do-jmethod selkeys "iterator"))
                       ready-sockets)
                  (loop while (jdi:do-jmethod selkey-iterator "hasNext")
                        do (let* ((key (jdi:jcoerce
                                        (jdi:do-jmethod selkey-iterator "next")
                                        "java.nio.channels.SelectionKey"))
                                  (chan (jdi:do-jmethod key "channel")))
                             (push (jdi:do-jmethod
                                    (jdi:jcoerce chan
                                                 (channel-class chan))
                                               "socket")
                                   ready-sockets)))
                  (remove-if #'(lambda (s)
                                 (not (member (socket s) ready-sockets
                                              :key #'jdi:jop-deref
                                              :test #'jdi:jequals)))
                                    sockets)))))
        ;; cancel all Selector registrations
        (let* ((keys (jdi:do-jmethod selector "keys"))
               (iter (jdi:do-jmethod keys "iterator")))
          (loop while (jdi:do-jmethod iter "hasNext")
                do (jdi:do-jmethod (jdi:jcoerce (jdi:do-jmethod iter "next")
                                                "java.nio.channels.SelectionKey")
                                   "cancel")))
        ;; close the selector
        (jdi:do-jmethod selector "close")
        ;; make all sockets blocking again.
        (let ((jtrue (jdi:jcoerce t :boolean)))
          (dolist (chan channels)
            (jdi:do-jmethod chan "configureBlocking" jtrue))))))
  
  
negative.code:                          (jdi:jcoerce sock-addr
                                        "java.net.SocketAddress")
                           (jdi:jcoerce backlog :int))
      (make-stream-server-socket chan :element-type element-type)))
  
  (defmethod socket-accept ((socket stream-server-usocket) &key element-type)
    (let* ((jsock (socket socket))
           (jacc-chan (jdi:do-jmethod-call jsock "accept"))
           (jacc-stream
            (ext:get-socket-stream (jdi:jop-deref
                                    (jdi:do-jmethod-call jacc-chan "socket"))
                                   :element-type (or element-type
                                                     (element-type socket)))))
      (make-stream-socket :socket jacc-chan
                          :stream jacc-stream)))
  
  ;;(defun print-java-exception (e)
  