Skip to content

Instantly share code, notes, and snippets.

@slyrus
Created May 17, 2020 05:26
Show Gist options
  • Save slyrus/414cdfc03f2284f1c3637c6ae92cbda9 to your computer and use it in GitHub Desktop.
Save slyrus/414cdfc03f2284f1c3637c6ae92cbda9 to your computer and use it in GitHub Desktop.
ABCL steram-fd
#+abcl
(progn
(require :abcl-contrib)
(require :jss))
#+abcl
(defun get-java-fields (object fields)
(reduce (lambda (x y)
(jss:get-java-field x y t))
fields
:initial-value object))
#+abcl
(defmethod stream-fd ((stream system::socket-stream))
(get-java-fields (#"getWrappedInputStream" (two-way-stream-input-stream stream))
'("in" "ch" "fdVal")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment