Differnce between linux write and sendfile syscall
- by JosiP
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