Re: Getting truncated data from sockets

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<bil.shah@xxxxxxxxx> wrote in message
news:1133215158.875926.212770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I am listening to a port for data but I am not able to recieve whole
> data, I only get truncated data. Client sends me data that exceeds 40K

I can't help with the code (no .Net experience to share yet <g>) but I can
tell you that you can never base your app on the hopes of getting full
packets (serial or TCP/IP) so you always have to buffer the data.

fwiw, if full packets is all you ever want to deal with.... and are sure
that you can control blocking, etc, in a meaningful way, you can use
SocketWrench... their new version supports fixed sized transfers where both
sides wait until the entire packet is transferred. It's a bit tricky because
of the blocking and handshaking but it's possible. This functionality may be
in their freeware version as well so.....

http://www.catalyst.com/

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..


.