anchor.diff:  (defun socket-connect (host port &key (element-type 'character))
     (let ((usock))
       (with-mapped-conditions (usock)
  -       (let ((sock (ext:make-socket (host-to-hostname host) port)))
  +      (let* ((sock-addr (jdi:jcoerce
  +                         (jdi:do-jnew-call "java.net.InetSocketAddress"
  +                                           (host-to-hostname host)
  +                                           (jdi:jcoerce port :int))
  +                         "java.net.SocketAddress"))
  +             (jchan (jdi:do-jstatic-call "java.nio.channels.SocketChannel"
  +                                         "open" sock-addr))
  +             (sock (jdi:do-jmethod-call jchan "socket")))
  +        (describe sock)
            (setf usock
                  (make-stream-socket
                   :socket sock
  -                :stream (ext:get-socket-stream sock
  +                :stream (ext:get-socket-stream (jdi:jop-deref sock)
                                                  :element-type element-type)))))))
   
   (defun socket-listen (host port
  
positive.code: 
  |#
  
  (defun jsocket-channel (jsocket)
    (jmethod-call jsocket ("getChannel")))
  
  (defun jselkey-channel (jselectionkey)
    (jmethod-call (jselectionkey "java.nio.channels.SelectionKey")
                  ("channel")))
  
  (defun op-read ()
    (java:jfield (java:jclass "java.nio.channels.SelectionKey")
                 "OP_READ"))
  
  (defun op-accept ()
    (java:jfield (java:jclass "java.nio.channels.SelectionKey")
                 "OP_ACCEPT"))
  
  (defun op-connect ()
    (java:jfield (java:jclass "java.nio.channels.SelectionKey")
                 "OP_CONNECT"))
  
  (defun valid-ops (jchannel)
    (jmethod-call (jchannel "java.nio.channels.SelectableChannel")
                  ("validOps")))
  
  (defun register (jchannel jselector ops)
    (jmethod-call (jchannel "java.nio.channels.SelectableChannel")
                  ("register" "java.nio.channels.Selector" "int")
                  jselector ops))
  
  (defun toggle-blocking (jchannel mode)
    (jmethod-call (jchannel "java.nio.channels.SelectableChannel")
                  ("configureBlocking" "boolean")
                  mode))
  
  (defun jselector-select (jselector timeout)
    (let ((to (truncate (* (or timeout 0) 1000))))
      (if (/= timeout 0)
          (jmethod-call (jselector "java.nio.channels.Selector")
                        ("select" "long") to)
        (jmethod-call (jselector "java.nio.channels.Selector")
                      ("selectNow")))))
  
  (defun jselector-selected-keys (jselector)
    (jmethod-call (jselector "java.nio.channels.Selector")
                  ("selectedKeys")))
  
  (defun jset-iterator (jset)
    (jmethod-call (jset "java.util.Set") ("iterator")))
  
  (defun jiterator-has-next (jiterator)
    (jmethod-call (jiterator "java.util.Iterator") ("hasNext")))
  
  (defun jiterator-next (jiterator)
    (jmethod-call (jiterator "java.util.Iterator") ("next")))
  
  (defun channel-class (jchannel)
    (let ((valid-ops (valid-ops jchannel)))
  
negative.code:                            (backlog 5)
                             (element-type 'character))
    (let* ((reuseaddress (if reuse-address-supplied-p reuse-address reuseaddress))
           (sock-addr (jdi:do-jnew-call "java.net.InetSocketAddress"
                                        (host-to-hostname host)
                                        (jdi:jcoerce port :int)))
           (chan (jdi:do-jstatic-call "java.nio.channels.ServerSocketChannel"
                                      "open"))
           (sock (jdi:do-jmethod-call chan "socket")))
      (when reuseaddress
        (jdi:do-jmethod-call sock
                             "setReuseAddress"
                             (jdi:jcoerce reuseaddress :boolean)))
      (jdi:do-jmethod-call sock
                           "bind"
                           (jdi:jcoerce sock-addr
                                        "java.net.SocketAddress")
                           (jdi:jcoerce backlog :int))
      (make-stream-server-socket sock :element-type element-type)))
  
  (defmethod socket-accept ((socket stream-server-usocket) &key element-type)
    (let* ((jsock (socket socket))
           (jacc-sock (jdi:do-jmethod-call jsock "accept"))
           (jacc-stream
            (ext:get-socket-stream (jdi:jop-deref jacc-sock)
                                   :element-type (or element-type
                                                     (element-type socket)))))
      (make-stream-socket :socket jacc-sock
  