aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Chat Programming. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Chat Programming." Watch "Chat Programming." New topic
Author

Chat Programming.

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hello,
I want to write a chat program where there are basically a server and many clients., I would be much appriciated if you guys give me some ideas,
Thank you very much.......


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
In high level terms consider this option. The Client and Server programs both open ServerSockets and act as clients to each other. If this is a bit confusing at first, do some simple tutorials on socket clients & servers, or find a friend and role-play the two machines.

Lots of moving parts, no? And I left out any way to log out. The client might tell the server it is logging out so the server can remove the client from the list of logged in clients. Or the server might try to connect to a client and fail, meaning the client is no longer running. That would be a sign to remove the client from the list of logged in clients, too.
Hope that helps!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hello all,
Thank you very much for the reply. I did figure out how to do the task, It is interesting. I am enjoying the programming.
Thank you very much for helping.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Chat Programming.