Currently I use this little snippet of code to get my java server up and allowing connections to it.
ServerSocket serverSocket = new ServerSocket(8000)
Socket socket = serverSocket.accept();
DataInputStream inputFromClient = new DataInputStream(socket.getInputStream());
DataOutputStream outputToClient = new DataOutputStream(socket.getOutputStream());
I was wondering how I can see all connections to my server from the client. Meaning the ip address connected, and everything about the incoming connection.
Thanks
Each time a client connects log the clients ip address etc. on your server, then have the client send a message to the server e.g. “get clients”. When the server socket reads this String on the datainputstream send the list of clients and there information back