There is a tutorial with examples
here[
^]
127.0.0.1 is not helpful: it is automatically connected back to the original machine...
http://www.tech-faq.com/127-0-0-1.html[
^]
If you look at your Network connections in Control Panel, you can find the current IP address for your machine. Be aware it may change next time you turn your PC on!
"hi! but what if there's no internet connection? can there be any other ways to connect the 2 PCs?"
You don't need an internet connection, just a network: two pcs, two cat5 cables, and a router or switch.
Alternatively, you could directly connect them via a serial cable, but then you would need the SerialPort class rather than Sockets.