
Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
>> i would like to know how in a application client/server how we send
>> received message to all client?
[quoted text clipped - 4 lines]
> latter. Just keep a list of clients, and write a list to send messages
> to each one... perhaps each in a different thread to control the delay.
ok for the second method but we need to connect to the client
the client need to be a server..
Roedy Green - 07 Dec 2005 20:07 GMT
On Wed, 07 Dec 2005 10:59:13 -0500, Marc Collin
<collinm@laboiteaprog.com> wrote, quoted or indirectly quoted someone
who said :
>ok for the second method but we need to connect to the client
>the client need to be a server..
Or:
1. UDP
2. every client maintains a socket
3. clients check in with HTTP every "minute" or so to see if there is
a massage.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Chris Smith - 07 Dec 2005 20:21 GMT
> ok for the second method but we need to connect to the client
> the client need to be a server..
When you establish a TCP connection from a client to the server, that
connection is two-way. The server can use it to send data to the
client. That's why java.net.Socket has methods called getInputStream()
and getOutputStream().
If your client disconnect, though, then yes they will need a
ServerSocket to listen for reconnection attempts from the server (and
this is also problematic because many -- or most? -- clients won't have
publicly available ports.)

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
zero - 07 Dec 2005 20:48 GMT
Chris Smith <cdsmith@twu.net> wrote in news:MPG.1e00f21c1bd135c4989c00
@news.altopia.net:
>> ok for the second method but we need to connect to the client
>> the client need to be a server..
[quoted text clipped - 8 lines]
> this is also problematic because many -- or most? -- clients won't have
> publicly available ports.)
Typically it's the client that connects to the server. The server just
sits, waiting for clients to connect. If you need the server to connect to
the client (instead of the other way around) you may want to rethink your
design.

Signature
Beware the False Authority Syndrome