caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Unix + UDP networking
Date: Mon, 5 Dec 2005 10:03:18 +0000	[thread overview]
Message-ID: <20051205100318.GA6870@furbychan.cocan.org> (raw)
In-Reply-To: <ad8cfe7e0512041813i49c7e19dk745ffdf489d961de@mail.gmail.com>

On Mon, Dec 05, 2005 at 03:13:33PM +1300, Jonathan Roewen wrote:
> I'm looking at the functions for sending/receiving over a
> datagram-based socket, and I'm confused about the return value of
> recvfrom.
> 
> val recvfrom : file_descr -> string -> int -> int -> msg_flag list ->
> int * sockaddr
> 
> What is the int value returned? The bytes actually read?

Have a look at the code in otherlibs/unix/sendrecv.c:unix_recvfrom.
The int is the return value from recvfrom(2), which is the number of
bytes received, or 0 if the peer has performed a shutdown.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


      reply	other threads:[~2005-12-05  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-05  2:13 Jonathan Roewen
2005-12-05 10:03 ` Richard Jones [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=20051205100318.GA6870@furbychan.cocan.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=jonathan.roewen@gmail.com \
    /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).