[ale] OT: Socket class + JNI

Jason Day jasonday at worldnet.att.net
Thu May 27 14:09:40 EDT 2004


On Thu, May 27, 2004 at 09:39:16AM -0400, Christopher Fowler wrote:
> Does anyone here have any idea how I can pass the file descriptor
> created by the Socket class to JNI code in Java?

You have to cheat a little, because the file descriptor is a private
member of the FileDescriptor class, which is itself a protected member
of the SocketImple class.  Attached is a quick code snippet that seems
to work.  At least, lsof appears to confirm it.

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SocketDescTest.java
Type: text/x-java
Size: 949 bytes
Desc: not available




More information about the Ale mailing list