title: Most efficient way to pass Java socket file descriptor to C binary file
body: <p>I can't seem to find the answer anywhere, I'm trying to obtain a socket in Java, and hand over its file descriptor number so that I can use it in a C binary (the fd would be as argument). </p>
  
  <p>I've obtained the FileDescriptor using reflection... but can't access the actual number anywhere.</p>
  
  <p>I know other people have suggested JNI, but I'd like to keep it within Java if possible (and couldn't fully figure out how to do it)</p>