I have a java app that creates a socket to talk to a server process, eg new java.net.Socket(String host, int port). This app includes a bunch of legacy c++ code that needs t
For your first question, if you have a java.net.Socket object reference in your JNI code, you can invoke methods on it, and so you can read and write data via the socket.