|
1. Check this tutorial. It is very clear and has simple examples. For handling multiple clients you will need to modify single client code a little bit. The basic idea is handling each connected client with a separate thread but you define what you will do in that thread..
2. Yes you can obtain IP/hostname. Check javadoc of ServerSocket class. Details are there.
|