-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sendfile method for streamsocket #4007
Conversation
@obiltschnig , @aleks-f friendly reminder |
@bas524 I'm tentatively marking this for 1.13 release, but we have to clarify the rationale for |
@aleks-f , You can see that when we enabling tests flag -DENABLE_CRYPTO=OFF is not working, and cmake windows builds failed with error libcrypto.lib not found |
That used to work fine, I'm not sure how it got broken. In any case, it seems to me that the solution would be to make sure libraries can be found by automatic link |
@aleks-f cmake -S. -Bcmake-build -DENABLE_NETSSL_WIN=ON -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_DATA=ON -DENABLE_DATA_ODBC=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_TESTS=ON -DCMAKE_CXX_FLAGS="/MP /EHsc" -DCMAKE_C_FLAGS=/MP Pay attention on -DENABLE_NETSSL_WIN=ON and -DENABLE_CRYPTO=OFF if(ENABLE_NETSSL_WIN)
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
if(ENABLE_TESTS)
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
endif()
endif() You can see that ENABLE_CRYPTO forces to ON Than look at CMakeLists.txt:287 if(ENABLE_CRYPTO AND ENABLE_TESTS)
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
endif() At this point ENABLE_NETSSL forces to ON, but libcrypto is absent |
@bas524 and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this pull does not trigger all CI, please create a new one.
add NotImplemented exception for unsupported platforms exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https:// github.com/emscripten-core/emscripten/pull/16234
@bas524 at this point, too late. But now we have the CI failure because VS projects were not regenerated and are missing the All Net-dependent project should be regenerated with ProGen. There is a new PowerShell script to do it in bulk |
alternatively, linking could be done like we have it in eg. Crypto on Windows: poco/Crypto/include/Poco/Crypto/Crypto.h Lines 138 to 160 in ec3c0f4
|
I'll fix this ASAP. |
This PR is motivated by #3277
I want add sendfile method to the stream socket
This functionality is cross platform, i.e. on posix systems it uses sendfile, on windows - TransmitFile
@obiltschnig , @aleks-f , Please review this changes and than I'll push changes in vcproj files and cmake files. Because there are many changes which adds mswsock.lib.
P.S. And further I'll add sendfile functionality to the httpserver