Function enableSendfile

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & enableSendfile(bool sendFile)=0

Description

Enable the sendfile system call in linux.

Parameters:

sendFile - if the parameter is true, sendfile() system-call is used to send static files to clients; The default value is true.

Note
This operation can be performed by an option in the configuration file. Even though sendfile() is enabled, only files larger than 200k are sent this way, because the advantages of sendfile() can only be reflected in sending large files.

Source

Line 844 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in to DocsForge