I've grepped the c include files for any reference to 30000 (in decimal, hex
and octal), but to no avail, so I've defined my own macro in a configuration
header file which I can change when compiling on another machine.
I have just noticed in the Berkeley sockets manual it mentions a 30000 byte
limit on the Send function, but it doesn't say anything about recv.
I could of course go for 1000 byte receives, but then I'll probably come
across some weird machine one day which has a maximum of 984 or something!
--
Cheers
James Ots
"Gavin Scott" <[log in to unmask]> wrote in message
news:9rug1e02edt@enews4.newsguy.com...
> James Ots writes:
> > 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.
>
> IIRC, NetIPC on MPE has a similar limit that differs from the HP-UX limit
> (one is 30,000, the other 32K). I think for NetIPC there was an
IPCCONTROL
> function to let you request a particular maximum size. No idea whether
> sockets provides the same thing. There's probably some official sockets
> answer to the question (either an API or a constant in some .h file).
>
> Of course there's very little difference between one 30,000 byte recv on a
> TCP socket and thirty 1,000 byte receives on the same socket. Yes, it's
> probably more efficient to make fewer calls, but the functionality will be
> the same since TCP has no concept of a "message" or a "packet" and every
> thing is done in units of single bytes, so it doesn't matter what size
> "chunks" you use to put data in to, or get data out of, a TCP socket.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|