Peer to Peer program

I would like to know how to write a program to communicate with another program located at another server in different location. Just call it Program A and B.

Program A and B must able to talk to each other, which it can send and receive a simple string.

Is it possible to do this by using the java SOCKET provided with public IP address and port no?

I would like to know whether there is a simple program and example link for me as a reference?

Thanks.

[485 byte] By [robotdoggia] at [2007-11-26 18:08:42]
# 1
Do you mean a plain client-sever application, not a peer-to-peer one?See: http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
hiwaa at 2007-7-9 5:40:27 > top of Java-index,Archived Forums,Socket Programming...