2001-11-19 06:09:12

by Lee Chin

[permalink] [raw]
Subject: sendfile from sockets

Hi,
Although the man page says you can sendfile from a
socket,I am unable to do so... I can only send file
from a file, to either a socket or file

Is this a kernel limitation?

Thanks
Lee

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com


2001-11-19 06:19:02

by Anton Blanchard

[permalink] [raw]
Subject: Re: sendfile from sockets


> Although the man page says you can sendfile from a
> socket,I am unable to do so... I can only send file
> from a file, to either a socket or file
>
> Is this a kernel limitation?

Yes, the manpage needs updating, you can only sendfile() from
something that exists in the pagecache (ie not a socket).

Anton

2001-11-19 08:00:39

by Lee Chin

[permalink] [raw]
Subject: Re: sendfile from sockets

Do I need to do something special to enable sendfile
in the kernel? It works on a 2.2 kernel, but not on a
2.4 kernel (and this is sendfile in general... not
just sockets)

Thanks
Lee
--- Anton Blanchard <[email protected]> wrote:
>
> > Although the man page says you can sendfile from a
> > socket,I am unable to do so... I can only send
> file
> > from a file, to either a socket or file
> >
> > Is this a kernel limitation?
>
> Yes, the manpage needs updating, you can only
> sendfile() from
> something that exists in the pagecache (ie not a
> socket).
>
> Anton


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

2001-11-21 13:13:01

by bert hubert

[permalink] [raw]
Subject: Re: sendfile from sockets

On Mon, Nov 19, 2001 at 05:16:53PM +1100, Anton Blanchard wrote:
> > Is this a kernel limitation?
>
> Yes, the manpage needs updating, you can only sendfile() from
> something that exists in the pagecache (ie not a socket).

The most recent manpages show this correctly.

--
http://www.PowerDNS.com Versatile DNS Software & Services
Trilab The Technology People
Netherlabs BV / Rent-a-Nerd.nl - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet