The moose likes Java in General and the fly likes Messages from server to clients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Messages from server to clients" Watch "Messages from server to clients" New topic

Messages from server to clients


Joined: Dec 01, 2004
Posts: 2
Hi there.
I got a problem, i hope someone can help me.
This is the problem, i got a lot 3 servers, and a lot of clients. when i run a process in a client when finish the client must send a message to all the clients. i don't know if this must be throught the server or what.
Somebody have a source code whoe can help me.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
We have each client open a ServerSocket at startup and register its address and port at login. Then if the server wants to send a message to one or all clients it can talk to their ServerSockets. We've done this with a fat Swing client and with a browser plus applet. Does that sound like what you need?

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

Joined: Dec 01, 2004
Posts: 2
Thanks a lot
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Welcome to the JavaRanch! Could you change your display name (click here)? Basically it should be a first and last name (If you'd like a more thorough reason as to why I'm asking you to change your name, check out the Naming Policy.)

Thanks! And again, Welcome to the JavaRanch!
It is sorta covered in the JavaRanch Style Guide.
subject: Messages from server to clients
It's not a secret anymore!