* [Caml-list] Unix + UDP networking
@ 2005-12-05 2:13 Jonathan Roewen
2005-12-05 10:03 ` Richard Jones
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Roewen @ 2005-12-05 2:13 UTC (permalink / raw)
To: caml-list
Hi,
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?
Jonathan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Unix + UDP networking
2005-12-05 2:13 [Caml-list] Unix + UDP networking Jonathan Roewen
@ 2005-12-05 10:03 ` Richard Jones
0 siblings, 0 replies; 2+ messages in thread
From: Richard Jones @ 2005-12-05 10:03 UTC (permalink / raw)
To: Jonathan Roewen; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-05 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-05 2:13 [Caml-list] Unix + UDP networking Jonathan Roewen
2005-12-05 10:03 ` Richard Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox