Created
May 17, 2020 05:26
-
-
Save slyrus/414cdfc03f2284f1c3637c6ae92cbda9 to your computer and use it in GitHub Desktop.
ABCL steram-fd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #+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