Hello,


I wrote a multiuser server application(c++), which is using select for
detection of incoming messages. When a message appears I must send
something to all the clients. I have a list of sockets, where I have to
send the message.(pretty much like a chat system). The client side is
written in Java, it has a reader thread, which is waiting for a message,
and depending what the message is it call's the appropriate handler from
the parent thread. First I had a problem, because the reader didn't get
runed till I increased his priority(weird).
        
Now the Problem is :

        -when I start 2 or 3 clients in appletviewer on my computer (Linux, RH5.0,
jdk1.1.5) I start loosing messages, I mean the server  seams to send the
message, but I have nothing on the client side(not for every clients, some
of them get's all, it's arbitrary).
After all we are talking about TCP. It shouldn't be like this.  

        -usually this is happening when I have to send multiple messages very
quickly:

                MSG1 - > client1
                MSG1 - > client2
                
                MSG2- > client1
                MSG2- > client2

I'm pretty sure that it's a problem with the client, but I tried to put a
delay on the server before I write in the socket. It improves the situation
a bit. I know, this is not a solution, so please send me some hints. 

Thanks
Steff

Reply via email to