[Libwebsockets] [libwebsockets] Use fread() when serving http files (#68)

"Andy Green (林安廸)" andy at warmcat.com
Thu Feb 27 02:04:42 CET 2014

On 27/02/14 08:51, the mail apparently from Patrick Gansterer included:
> Pleas don't get me wrong, I'm ok with you point, I just want to discuss it before writing the code.
> the f... API is only used for serving files via HTTP GET and thats not the main purpose of lws.
> If you don't "like" the standardized C function, I'd use ReadFile directly on Windows platforms to avoid the additional overhead of fread there too. Is that ok?

If you're wrapping them in macros only WinCE will use, either way is 
fine, since only WinCE will care.

Probably WinCE is a good example of the resource-constrained platform 
that can do better with also avoiding the C library buffering, so it 
sounds reasonable to use ReadFile.


> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/warmcat/libwebsockets/pull/68#issuecomment-36197820

More information about the Libwebsockets mailing list