Re: How can I send a file through socket?
On Jun 2, 8:33 pm, Paavo Helde <pa...@nospam.please.ee> wrote:
James Kanze <james.ka...@gmail.com> kirjutas:
next. (A professional program will usually use a pool of
buffers and non-blocking reads, but that requires some system
dependent code.)
Just for curiosity: if a program uses mmap() or equivalent to
map the file (or parts to it) into memory and use it from
there without asynchronous IO, would it make it less
professional, in your opinion?
It depends on the context. If it was a pure copy program,
probably, since that would limit the size of the file being
copied, and probably run slower as well (although that depends
on the OS). But very few people are writing pure copy
programs---they were generally written a long time ago. For a
lot of uses, mmap is a very good solution.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34