Board index » delphi » Multiple clients, one server problem.

Multiple clients, one server problem.

Hi there.

I am working on a simple chat-program and planning to slowly let it grow
just for educational purposes.

Now I have a server and a client ready for use.
The problem is that the server accepts multiple connections at once, but
also handles them seperatly.

What I mean is, in client one, I type some words and send them to the
server.
The server displays them as it should (YAY !:P) but client two and three do
not see what I typed.
Same goes for Client two and three, one and three and one and two
respectively will not see what is typed.

Now I told the server to send the received strings back to the client with
the Socket.SendText command.
What I really would like tho is a way to send this string to ALL connected
clients if possible. This way as you would have guessed a multi-user chat
becomes reality.

Can anyone help me out and point me in the right direction ?

thanks.

 

Re:Multiple clients, one server problem.


Hi

could it be, that just the last client get the string/send the string?

---
Michael Olschimke
olschi...@gmx.net

JavaDoc for Delphi? For C++? For InstallShield? For any other language?
 --> http://members.easyspace.com/olschimke

Other Threads