Re: Broken TCP/IP packets
- From: "MisterE" <voids@xxxxxxxxxxxxxxx>
- Date: Wed, 11 Apr 2007 17:27:43 +1000
So your reciveing end simply must be written so as it keeps on reading
from the TCP stream up until you have 20 bytes, and store excess bytes
it may have read for the next call. This can easily be implemented
with a ring buffer structure and as many calls to recv() as needed.
If you try to circumvent this, you are fighting against TCP and
potential oddities/requierements of the unterlaying network along the
comunication path.
No converter will break up a 20 byte burst into multiple packets. If this is
happeneing its the worst converter I have ever seen. If the packets were
2,000 bytes then maybe, but I have never seen a converter send while data is
still being recieved. I suspect the user has set a setting wrong on the
device to only allow 10 byte buffer or something. We have 300byte packets
and have NEVER seen on brocken out of hundreds of thousands (I programmed it
to log these and it has never happened).
.
- Follow-Ups:
- Re: Broken TCP/IP packets
- From: Ali
- Re: Broken TCP/IP packets
- From: Ali
- Re: Broken TCP/IP packets
- References:
- Broken TCP/IP packets
- From: Ali
- Re: Broken TCP/IP packets
- From: Markus Zingg
- Broken TCP/IP packets
- Prev by Date: Re: Atmel releasing FLASH AVR32 ?
- Next by Date: Re: Need MicroControllers with built in USB Port and Protocol
- Previous by thread: Re: Broken TCP/IP packets
- Next by thread: Re: Broken TCP/IP packets
- Index(es):
Relevant Pages
|