Skip to contentSkip to conversation

sendfile from sockets

DISCUSSION Lee Chin 3 participants 4 messages Nov 19, 2001 – Nov 21, 2001

lore
Share & tools
lore

Lee Chin

author
#0 lore raw

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

#1 lore raw
Quoted 6 lines

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

author
#2 lore raw

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

Quoted 6 lines · --- Anton Blanchard
Quoted 3 lines

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

file

Quoted 2 lines

from a file, to either a socket or file

Quoted 8 lines
Quoted 1 line

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

#3 lore raw
In reply to Lee Chin
Quoted 4 lines · Anton Blanchard
Quoted 1 line

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.

Signature · 4 lines
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