This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, I want to contact my friend's system which is about a 20 kms from my house.In case I want to share the files of his system,how can I do it?I 'm planning to write a socket file listening to a specific port& giving the file when I connect to that port.The problem is how can I connect to his system?Is it possible to do by knowing his IP address when connected online & create client socket to his system & read the file,or is there any other way to do it?please help me to do this,reply me as soon as possible. Happy middling with java. Netharam.
hi, you can connect to your friends computer using a socket, yes. here is what you need to do: find out his ip: you cant find out his ip in pure client-client model (if it is not fixed - and dial up connections dont have fixed ip's). but: - you can use no-ip.com. - have your program upload the ip in text format to an ftp server and when you want to connect to your friend you first download the file and extract the ip - send him an eMail with your ip ..... then write a serversocket waiting for an incomming connection on a specified port. recieve the sockets out of ServerSocket.accept() method and get the Writers/Readers from the Socket. write your file in on your computer and read the file on the other... there are a lot of tutorials and faq's around to see how this works. greets, karl
subject: getting the IP address when system is Online[urgent]