I have developed a Chat program using ServerSocket and Simple sockets.
This is a server based script. I also want to enable Private
Messaging, Can any one give me any idea
The source code can be viewed at
http://geocities.com/zeeshan_azeemi/javaChat.zip
Thanx in Advance
Either:
1) Stick some kind of 'to' header on the message, and have the server
only deliver it to the user with that name ...or...
2) Get each client to listen for incoming connections and publicise
each client's IP via the server, thus allowing clients to connect
directly to each other in a peer-to-peer fashion.
As a further note to (2) above, you might want to have some kind of
'request PM' facility, in which a request to open a private message
session is sent to the server, and forwarded on to the target client.
If the target accepts, it begins to listen on a specific port, and
notifies the server, which in turn sends the IP/port details back to
the initiating client. The initiating client can now open a peer-to-
peer connection. This method is more secure than just publishing the
IP of every client, and having them all listening for incoming p2p
connections all the time.
-FISH- ><>