Re: .Net TCP Socket Problem With Missing Chunks From Large Packets

From: Feroze [MSFT] (ferozed_at_online.microsoft.com)
Date: 02/23/04


Date: Sun, 22 Feb 2004 20:12:34 -0800

Please post some code on the sender & receiver at the point where you write
out the data & read the data.

Most of the issues of such nature that I have found have to do with making
wrong assumptions about the TCP stream behavior, or other bugs in processing
the input stream.

-- 
http://weblogs.asp.net/feroze_daud
Remove "user" from the email address to reply to the author.
This posting is provided "AS IS" with no warranties, and confers no rights
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Sami Vaaraniemi" <samivawantsnospam@jippii.fi> wrote in message
news:c0i3oh$1u1$1@phys-news1.kolumbus.fi...
>
> "Todd" <getmyemails2@yahoo.com> wrote in message
> news:u8EF9tb8DHA.2576@TK2MSFTNGP09.phx.gbl...
> > Hello,
> >
> > An acquaintance asked me to assist him with some TCP socket issues.  I
> > thought I might present the question as it may be of interest or
> > may already have encountered the problem.
> >
> > Basically, when sending small packets of data over short distances, the
> data
> > arrives properly.  However, when large packets are sent over longer
> > distances, the data arrives with portions missing.
>
> TCP is a stream oriented protocol. That means that if you send n bytes,
the
> receiver might receive anywhere from 1 to n bytes when reading data out of
> the socket. In order to receive all the data that was sent, the receiver
> typically reads the data in a loop and blocks until all the data has
> arrived.
>
> Now if you are already handling the above and you are missing data in the
> middle of a packet, then I'm not sure what the problem is. TCP is a
reliable
> protocol and you should be getting an error indication in case of
> transmission problems.
>
> Sami
>
>


Relevant Pages

  • Re: Simulating smaller MTU? ie sending small packets.
    ... This is due to the fact that TCP ... If you want smaller packets, ... >> set there as the MSS is announced by the receiver during the ... Yes, per connection. ...
    (comp.lang.perl.misc)
  • Re: Simulating smaller MTU? ie sending small packets.
    ... The smaller the packets are, ... This is due to the fact that TCP ... > What I observe is that once the receiver is not ... > keeping up with the speed the sender is spewing packets, ...
    (comp.lang.perl.misc)
  • Re: .Net TCP Socket Problem With Missing Chunks From Large Packets
    ... > An acquaintance asked me to assist him with some TCP socket issues. ... when large packets are sent over longer ... the data arrives with portions missing. ... TCP is a stream oriented protocol. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Losing UDP packets with MFC Sockets
    ... UDP packets are not commingled as TCP packets are, ... TCP behavior does not imply the same behavior in UDP. ... nor the receiver will ever discover this from the basic protocol. ...
    (microsoft.public.vc.mfc)
  • Re: FTP Error 426
    ... TCP also provides a means to communicate to the receiver of data that at some point further along in the data stream than the receiver is currently reading there is urgent data. ... correct description is "command" not "subcommand", specifically an "FTP service command", see section 4.1.3. ...
    (bit.listserv.ibm-main)