From: ishare <june.tune.sea@gmail.com>
To: Kristof Provost <kristof@sigsegv.be>
Cc: linux-newbie@vger.kernel.org
Subject: Re: seq in tcp protocol
Date: Sun, 24 Mar 2013 11:29:32 +0800 [thread overview]
Message-ID: <20130324032932.GB23928@debian.localdomain> (raw)
In-Reply-To: <20130323133117.GB9539@thebe.jupiter.sigsegv.be>
On Sat, Mar 23, 2013 at 02:31:18PM +0100, Kristof Provost wrote:
> On 2013-03-22 21:30:08 (+0800), ishare <june.tune.sea@gmail.com> wrote:
> > If I send a buffer with tcp protocol , the data is separated to serveral packets ,
> > each packet will have a seq number with it ,which ensures the recipient read this buffer
> > in right orfer .
> >
> > my question is : how the recipient know which is the end packet of this queue ? Is there
> > data indicate the total quantity of packets composing this buffer ?
> >
> TCP is a stream protocol. There is no concept (at the application level
> anyway) of packets in TCP. The receiving TCP/IP stack is free to offer
> the data to the application whenever it decides to, in however many
> lumps as it decides to. Similarly, the sending TCP/IP stack may decide
> to wait to send data until it's received more from the sending
> application before packaging it and sending it to the receiver.
When one send system api is called , will all data in the buffer
be sent out together at one time ?
>
> You may find http://en.wikipedia.org/wiki/Nagle%27s_algorithm
> interesting.
>
> Regards,
> Kristof
>
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2013-03-24 3:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 13:30 seq in tcp protocol ishare
2013-03-23 13:31 ` Kristof Provost
2013-03-24 3:29 ` ishare [this message]
2013-03-24 9:37 ` Kristof Provost
2013-03-24 10:26 ` Aniruddha Bhattacharyya
2013-03-24 11:57 ` ishare
2013-03-24 12:08 ` Kristof Provost
2013-03-30 19:17 ` Anatoliy Sivov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130324032932.GB23928@debian.localdomain \
--to=june.tune.sea@gmail.com \
--cc=kristof@sigsegv.be \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox