Re: multithreaded tcp/ip monitoring application
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 12 Jul 2007 10:34:47 -0700
On Thu, 12 Jul 2007 09:16:03 -0700, Punit Kaur <PunitKaur@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
[...]
Now the problem is... the sending of the data is so fast that the receiving
side is not able to keep up with it. From the server side I am sending data
in a comma separated fashion. And each data packet I send has constant length
61 bytes. If If do not add any delay in send, the receive at the client side
receives 2-3 data packets and then is not able to parse the received data
properly.
As Michael's response indicates, you need to delimit your data yourself.
I suspect that you are not dealing with a bandwidth problem, but rather a logic error in your own code. Just because the sender sends in 61-byte increments, that doesn't mean that's how the data is sent out the network adapter, nor does it mean that's how the data is received on the receiving side. That's why you receive "2-3 data packets"...when several 61-byte chunks are sent in quick succession they are automatically coalesced by TCP.
When you receive these, you need to break them apart yourself.
Pete
.
- Follow-Ups:
- Re: multithreaded tcp/ip monitoring application
- From: Punit Kaur
- Re: multithreaded tcp/ip monitoring application
- References:
- Re: multithreaded tcp/ip monitoring application
- From: Peter Duniho
- Re: multithreaded tcp/ip monitoring application
- From: Punit Kaur
- Re: multithreaded tcp/ip monitoring application
- From: Punit Kaur
- Re: multithreaded tcp/ip monitoring application
- From: Peter Duniho
- Re: multithreaded tcp/ip monitoring application
- Prev by Date: Sockets - ReceiveBuffer vs ReceiveBufferSize
- Next by Date: Detecting CD drive letter in C#
- Previous by thread: Re: multithreaded tcp/ip monitoring application
- Next by thread: Re: multithreaded tcp/ip monitoring application
- Index(es):