I've got a node.js server, whose purpose is to let a Java application user first connect to this server.
Then a user of the java program, when connecting with this program to the node.js server, is told about all other connected users on this server.
What I want to do, is whenever an instance of my java program asks to play with a connected player : it is returned a JSON object with the wanted player public and private ip (if it is behind a nat) ... so that the program can create a socket between the two instances of the java program.
Is it possible ? I mean : is there a way for my java program to communicate with the node.js ? Is it possible to get the user private ip adress ? And is returning JSON object enough for security, or should I encrypt and decode it ?