[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-12-05 (09:41) |
From: | Richard Jones <rich@a...> |
Subject: | Re: [Caml-list] Unix + UDP networking |
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