On Mon, Mar 08, 2010 at 10:16:44PM +0100, ????? ???????????? wrote:
> How large is the max. peek ahead for SOCK_STREAM?
It would be equal to size of the receive buffer, and if an application
set it to a maximum it would be 1M (assuming the admin has not changed
the default upper limit, which could be set as high as 1<<30).
> How large is the max. peek ahead for Unix pipes?
> How large is the max. peek ahead for Unix FIFO?
>
> Olga
>
> 2010/3/8 Anders Persson <anders.persson at sun.com>:
> > On Mon, Mar 08, 2010 at 09:33:20PM +0100, ????? ???????????? wrote:
> >> What is the maximum amount of bytes an application can peek ahead on
> >> pipes and sockets?
> >
> > For sockets that depends on whether you are dealing with SOCK_DGRAM or
> > SOCK_STREAM. For dgram you can only peek into a single datagram, while
> > on stream sockets you can peek into the whole socket buffer (assuming
> > your are not using urgent data. If you are, then you wont be able to
> > peek beyond the urgent mark).
> >
> > -- Anders
> >
>
>
>
> --
> , _ _ ,
> { \/`o;====- Olga Kryzhanovska -====;o`\/ }
> .----'-/`-/ olga.kryzhanovska at gmail.com \-`\-'----.
> `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
> /\/\ /\/\
> `--` `--`
>
-- Anders