HP3000-L Archives

November 2001, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Fri, 2 Nov 2001 09:11:39 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
James Ots wrote:
>
> When using the Sockets function 'recv', if I give it a length
> parameter of 30001 it returns an error of EINVAL, although 30000 is
> fine.
>
> Is this number defined somewhere? It doesn't seem to be in the
> documentation, and I haven't found any reference to it on the
> internet. I'm trying to write portable code, so I don't want to use a
> hard code

It's documented in the send() section of the Berkeley Sockets manual:

http://docs.hp.com/mpeix/onlinedocs/32650-90372/00/00/15-con.html

For being portable, you might try calling getsockopt() to read the values of
SO_RCVBUF and SO_SNDBUF in order to determine your maximum buffer sizes.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2