To see what's on the network checkout
http://www.sniffit.com
Also u can put a load of print(f/ln)s in the client
and server stuff to see what's going on.
Create some logs and pick through them.
This (crude) method is usually the best
for multithreaded stuff.
Beyond that, start write test harnesses for each side
of the socket, to see whether your problem is client
or server side...
Is you client thread safe? (synchronized)
Stefan Toth wrote:
>
> 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
--
Joe Carter Software Engineer
Brite Voice Systems Ltd, Gatley, Cheshire. UK.
mailto:[EMAIL PROTECTED]