linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn.clements@virgin.net>
To: "Earl R. Lapus" <elapus@ntsp.nec.co.jp>
Cc: linux-c-prog <linux-c-programming@vger.kernel.org>
Subject: Re: recv()
Date: Tue, 27 Aug 2002 05:23:56 +0100	[thread overview]
Message-ID: <15722.65244.976088.803677@cerise.nosuchdomain.co.uk> (raw)
In-Reply-To: <LFEIJFMKHCJIHBFOGINPCEIGCHAA.elapus@ntsp.nec.co.jp>


Earl R. Lapus wrote:

>      I have a question about recv()...
>      When calling recv() you specify the maximum data
>      size you want to receive, right? So if the actual data
>      sent at the other end is larger... what happens to the
>      rest of the data? Who manages the data? 

It depends upon the protocol. For TCP, subsequent data will be
returned by the next call to recv(); packet boundaries are irrelevant. 
For UDP, the rest of the packet will be discarded, so you need to
ensure that the buffer is large enough to hold an entire packet.

-- 
Glynn Clements <glynn.clements@virgin.net>

      parent reply	other threads:[~2002-08-27  4:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <LFEIJFMKHCJIHBFOGINPCEIGCHAA.elapus@ntsp.nec.co.jp>
2002-08-27  4:21 ` recv() Manas Garg
2002-08-27  4:23 ` Glynn Clements [this message]

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=15722.65244.976088.803677@cerise.nosuchdomain.co.uk \
    --to=glynn.clements@virgin.net \
    --cc=elapus@ntsp.nec.co.jp \
    --cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).