Differnce between linux write and sendfile syscall
Posted
by JosiP
on Stack Overflow
See other posts from Stack Overflow
or by JosiP
Published on 2010-04-30T10:01:38Z
Indexed on
2010/04/30
10:07 UTC
Read the original article
Hit count: 475
Hi
Im programming webserver (C), which should send big files. My question is: What are the main differneces in two syscalls: write and sendfile. Does sendfile depends on size of socket system buffer ? I noticed that write often writes less then i requested.
For example, if got many requests for one file: should i open it, copy into memory and use 'write', or maybe i can do 'sendfile' for each client ?
thx in advance for all answers
© Stack Overflow or respective owner