Using native sendfile from OS for HttpServer (#4351)

* add possibility to use native sendFile from OS for HttpServerResponse
add option POCO_USE_SENDFILE_FOR_HTTPSERVER, default - OFF
add test for HttpServer - testFile
add define fro Config.h POCO_USE_SENDFILE_FOR_HTTPSERVER

* my fail, be carefull with macro and brackets

* replace option POCO_USE_SENDFILE_FOR_HTTPSERVER with compiletime
detected macro POCO_HAVE_SENDFILE
replace types for sendFile with platform depended
wrap possibility of using sendFile with macro, if sendFile doesn't exist
in OS, then all methods don't exist

* remove option POCO_USE_SENDFILE_FOR_HTTPSERVER from ci.yml

* wrap testSendFile in the suite with define POCO_HAVE_SENDFILE

* try fix compile problem with emscripten

* oh, emscripten again

* fix logical error in testSendFile

* fix problem with cmake-specific macro when usinf make-project

* revert types from platform depended to Poco::Int64 and Poco::UInt64
for sendfile
This commit is contained in:
Alexander B
2024-09-01 21:45:33 +03:00
committed by GitHub
parent 73df3689bf
commit 710c2a41f3
15 changed files with 145 additions and 29 deletions

View File

@@ -79,7 +79,7 @@ public:
NativeHandle nativeHandle() const;
/// Returns native file descriptor handle
Poco::UInt64 size() const;
UInt64 size() const;
/// Returns file size
void flushToDisk();