On Sun, Jun 17, 2001 at 05:13:43PM -0400, Albert D. Cahalan wrote: > > Is there any logical reason why if, given fd is a connected, AF_INET, > > SOCK_STREAM socket, and one does a write(fd, buffer, len); close(fd); > > to the peer, over a rather slow network (read modem, satelite link, etc), > > the data gets lost (the remote receives the disconnect before the last > > packet). According to socket(7), even if SO_LINGER is not set, the data > > is flushed in the background. > > > > Is it Linux or TCP specific? Or some obvious techincal detail I'm missing? > > The UNIX API (Linux, BSD, Solaris, OSF/1...) requires that you > put that write() call in a loop, because you can get partial > writes. Repeat until done... the OS might do 1 byte at a time. Not so true. The write is completed successfuly, ie. size == write(fd, buf, size); so the data actually gets to the kernel's network buffer, only the background polling is not done properly, in the way I see things. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Re: Client receives TCP packets but does... Robert Kleemann
- Re: Client receives TCP packets but does... Mike Black
- Re: Client receives TCP packets but does not ACK Robert Kleemann
- Re: Client receives TCP packets but does not ACK Robert Kleemann
- Re: Client receives TCP packets but does not ACK Andi Kleen
- Re: Client receives TCP packets but does not ACK Robert Kleemann
- RE: Client receives TCP packets but does not ACK Heusden, Folkert van
- Re: Client receives TCP packets but does not ACK Mike Black
- Re: Client receives TCP packets but does not... Alan Cox
- Re: Client receives TCP packets but does... Dan Podeanu
- Re: Client receives TCP packets but ... Dan Podeanu
- Re: Client receives TCP packets but ... dean gaudet
- Re: Client receives TCP packets but does not... Gérard Roudier
- Re: Client receives TCP packets but does not ACK Jan Hudec
- Re: Client receives TCP packets but does not... dean gaudet
- Re: Client receives TCP packets but does... Jonathan Morton
- Re: Client receives TCP packets but ... dean gaudet
- Re: Client receives TCP packets... Jonathan Morton
- Re: Client receives TCP pac... dean gaudet
- RE: Client receives TCP packets but does not... David Schwartz
- Re: Client receives TCP packets but does not ACK Alan Cox