mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
add sendfile method for streamsocket (#4007)
* add sendfile method for streamsocket * add mswsock.lib to the project files and templates * remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build * merge from upstream * merge from upstream * fix code stile add NotImplemented exception for unsupported platforms exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https:// github.com/emscripten-core/emscripten/pull/16234 * add iostream include for std::cout * fix compilation for emscripten (wrap sendfile)
This commit is contained in:
parent
689a81c4c4
commit
24b7122f43
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -350,7 +350,7 @@ jobs:
|
||||
class CppUnit::TestCaller<class HTTPSStreamFactoryTest>.testProxy
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: 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
|
||||
- run: 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"
|
||||
- run: cmake --build cmake-build --config Release
|
||||
- uses: ./.github/actions/retry-action
|
||||
with:
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -12,7 +12,7 @@ vc.project.compiler.defines =
|
||||
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -7,7 +7,7 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ${vc.project.pocobase}\\Foundation\\include
|
||||
vc.project.compiler.defines = _CRT_SECURE_NO_WARNINGS
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md =
|
||||
|
@ -9,4 +9,4 @@ vc.project.prototype = TestSuite_vs90.vcproj
|
||||
mysql = ${vc.project.pocobase}\\mysql
|
||||
vc.project.compiler.include = ${mysql}\\include;${vc.project.pocobase}\\Foundation\\include; \
|
||||
${vc.project.pocobase}\\Data\\include;${vc.project.pocobase}\\Data\\src
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\CppUnit\\include;..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\testsuite\\DataTest\\include
|
||||
vc.project.linker.dependencies = odbc32.lib odbccp32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = odbc32.lib odbccp32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -10,7 +10,7 @@ postgresql = ${vc.project.pocobase}\\postgresql
|
||||
vc.project.compiler.include = ${postgresql}\\include;${vc.project.pocobase}\\Foundation\\include; \
|
||||
${vc.project.pocobase}\\Data\\include;${vc.project.pocobase}\\Data\\src
|
||||
vc.project.compiler.defines = _CRT_SECURE_NO_WARNINGS
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md =
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include;..\\..\\..\\Net\\include
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -11,4 +11,4 @@ vc.project.prototype = TestSuite_vs90.vcproj
|
||||
#vc.project.compiler.std.c=stdc11
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.compiler.include = ..\\src;..\\..\\Foundation\\include
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib
|
||||
|
@ -12,5 +12,5 @@ vc.project.compiler.defines =
|
||||
vc.project.compiler.defines.shared =
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Encodings\\include
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -47,6 +47,9 @@ class Foundation_API FileIOS: public virtual std::ios
|
||||
/// On Windows platforms, UTF-8 encoded Unicode paths are correctly handled.
|
||||
{
|
||||
public:
|
||||
|
||||
using NativeHandle = FileStreamBuf::NativeHandle;
|
||||
|
||||
FileIOS();
|
||||
/// Creates the basic stream.
|
||||
|
||||
@ -63,6 +66,12 @@ public:
|
||||
FileStreamBuf* rdbuf();
|
||||
/// Returns a pointer to the underlying streambuf.
|
||||
|
||||
NativeHandle nativeHandle() const;
|
||||
/// Returns native file descriptor handle
|
||||
|
||||
Poco::UInt64 size() const;
|
||||
/// Returns file size
|
||||
|
||||
protected:
|
||||
FileStreamBuf _buf;
|
||||
};
|
||||
|
@ -31,6 +31,8 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf
|
||||
/// This stream buffer handles Fileio
|
||||
{
|
||||
public:
|
||||
using NativeHandle = int;
|
||||
|
||||
FileStreamBuf();
|
||||
/// Creates a FileStreamBuf.
|
||||
|
||||
@ -50,6 +52,12 @@ public:
|
||||
std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out);
|
||||
/// Change to specified position, according to mode.
|
||||
|
||||
NativeHandle nativeHandle() const;
|
||||
/// Returns native file descriptor handle
|
||||
|
||||
Poco::UInt64 size() const;
|
||||
/// Returns file size
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
@ -61,7 +69,7 @@ protected:
|
||||
|
||||
private:
|
||||
std::string _path;
|
||||
int _fd;
|
||||
NativeHandle _fd;
|
||||
std::streamoff _pos;
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,8 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf
|
||||
/// This stream buffer handles Fileio
|
||||
{
|
||||
public:
|
||||
using NativeHandle = HANDLE;
|
||||
|
||||
FileStreamBuf();
|
||||
/// Creates a FileStreamBuf.
|
||||
|
||||
@ -49,6 +51,12 @@ public:
|
||||
std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out);
|
||||
/// change to specified position, according to mode
|
||||
|
||||
NativeHandle nativeHandle() const;
|
||||
/// Returns native file descriptor handle
|
||||
|
||||
Poco::UInt64 size() const;
|
||||
/// Returns file size
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
@ -60,7 +68,7 @@ protected:
|
||||
|
||||
private:
|
||||
std::string _path;
|
||||
HANDLE _handle;
|
||||
NativeHandle _handle;
|
||||
UInt64 _pos;
|
||||
};
|
||||
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -7,4 +7,4 @@ vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -50,6 +50,16 @@ FileStreamBuf* FileIOS::rdbuf()
|
||||
}
|
||||
|
||||
|
||||
FileIOS::NativeHandle FileIOS::nativeHandle() const
|
||||
{
|
||||
return _buf.nativeHandle();
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt64 FileIOS::size() const {
|
||||
return _buf.size();
|
||||
}
|
||||
|
||||
FileInputStream::FileInputStream():
|
||||
std::istream(&_buf)
|
||||
{
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -167,4 +169,21 @@ std::streampos FileStreamBuf::seekpos(std::streampos pos, std::ios::openmode mod
|
||||
}
|
||||
|
||||
|
||||
FileStreamBuf::NativeHandle FileStreamBuf::nativeHandle() const
|
||||
{
|
||||
return _fd;
|
||||
}
|
||||
|
||||
Poco::UInt64 FileStreamBuf::size() const
|
||||
{
|
||||
struct stat stat_buf;
|
||||
int rc = fstat(_fd, &stat_buf);
|
||||
if (rc < 0)
|
||||
{
|
||||
Poco::SystemException(strerror(errno), errno);
|
||||
}
|
||||
return stat_buf.st_size;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
@ -199,4 +199,23 @@ std::streampos FileStreamBuf::seekpos(std::streampos pos, std::ios::openmode mod
|
||||
}
|
||||
|
||||
|
||||
FileStreamBuf::NativeHandle FileStreamBuf::nativeHandle() const
|
||||
{
|
||||
return _handle;
|
||||
}
|
||||
|
||||
Poco::UInt64 FileStreamBuf::size() const
|
||||
{
|
||||
LARGE_INTEGER result;
|
||||
result.QuadPart = 0;
|
||||
DWORD high = 0;
|
||||
result.LowPart = ::GetFileSize(_handle, &high);
|
||||
if (high > 0)
|
||||
{
|
||||
result.HighPart = high;
|
||||
}
|
||||
return result.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\JSON\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\JSON\\include;..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Net\\include;..\\..\\..\\MongoDB\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -28,7 +28,7 @@ set_target_properties(Net
|
||||
target_link_libraries(Net PUBLIC Poco::Foundation)
|
||||
# Windows and WindowsCE need additional libraries
|
||||
if(WIN32)
|
||||
target_link_libraries(Net PUBLIC "iphlpapi.lib")
|
||||
target_link_libraries(Net PUBLIC "iphlpapi.lib" "mswsock.lib")
|
||||
if(WINCE)
|
||||
target_link_libraries(Net PUBLIC "ws2.lib")
|
||||
else()
|
||||
|
@ -13,6 +13,6 @@ vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
vc.solution.include = testsuite\\TestSuite
|
||||
|
@ -27,6 +27,11 @@
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class FileInputStream;
|
||||
|
||||
|
||||
namespace Net {
|
||||
|
||||
|
||||
@ -473,6 +478,11 @@ public:
|
||||
bool initialized() const;
|
||||
/// Returns true iff the underlying socket is initialized.
|
||||
|
||||
Poco::Int64 sendFile(FileInputStream &FileInputStream, Poco::UInt64 offset = 0);
|
||||
/// Sends file using system function
|
||||
/// for posix systems - with sendfile[64](...)
|
||||
/// for windows - with TransmitFile(...)
|
||||
|
||||
protected:
|
||||
SocketImpl();
|
||||
/// Creates a SocketImpl.
|
||||
|
@ -24,6 +24,11 @@
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class FileInputStream;
|
||||
|
||||
|
||||
namespace Net {
|
||||
|
||||
|
||||
@ -253,6 +258,11 @@ public:
|
||||
/// The preferred way for a socket to receive urgent data
|
||||
/// is by enabling the SO_OOBINLINE option.
|
||||
|
||||
Poco::Int64 sendFile(FileInputStream &FileInputStream, Poco::UInt64 offset = 0);
|
||||
/// Sends file using system function
|
||||
/// for posix systems - with sendfile[64](...)
|
||||
/// for windows - with TransmitFile(...)
|
||||
|
||||
StreamSocket(SocketImpl* pImpl);
|
||||
/// Creates the Socket and attaches the given SocketImpl.
|
||||
/// The socket takes ownership of the SocketImpl.
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -17,12 +17,15 @@
|
||||
#include "Poco/Net/StreamSocketImpl.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/FileStream.h"
|
||||
#include "Poco/Error.h"
|
||||
#include <string.h> // FD_SET needs memset on some platforms, so we can't use <cstring>
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_FD_EPOLL)
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include "wepoll.h"
|
||||
#include "mswsock.h"
|
||||
#else
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
@ -42,9 +45,21 @@
|
||||
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <csignal>
|
||||
#endif
|
||||
|
||||
|
||||
#if POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FAMILY_BSD
|
||||
#include <sys/uio.h>
|
||||
#include <sys/types.h>
|
||||
using sighandler_t = sig_t;
|
||||
#endif
|
||||
|
||||
#if POCO_OS == POCO_OS_LINUX && !defined(POCO_EMSCRIPTEN)
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable:4996) // deprecation warnings
|
||||
#endif
|
||||
@ -1358,5 +1373,81 @@ void SocketImpl::error(int code, const std::string& arg)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
Poco::Int64 SocketImpl::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset)
|
||||
{
|
||||
FileIOS::NativeHandle fd = fileInputStream.nativeHandle();
|
||||
Poco::UInt64 fileSize = fileInputStream.size();
|
||||
std::streamoff sentSize = fileSize - offset;
|
||||
LARGE_INTEGER offsetHelper;
|
||||
offsetHelper.QuadPart = offset;
|
||||
OVERLAPPED overlapped;
|
||||
memset(&overlapped, 0, sizeof(overlapped));
|
||||
overlapped.Offset = offsetHelper.LowPart;
|
||||
overlapped.OffsetHigh = offsetHelper.HighPart;
|
||||
overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
if (overlapped.hEvent == nullptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
bool result = TransmitFile(_sockfd, fd, sentSize, 0, &overlapped, nullptr, 0);
|
||||
if (!result)
|
||||
{
|
||||
int err = WSAGetLastError();
|
||||
if ((err != ERROR_IO_PENDING) && (WSAGetLastError() != WSA_IO_PENDING)) {
|
||||
CloseHandle(overlapped.hEvent);
|
||||
error(err, Error::getMessage(err));
|
||||
}
|
||||
WaitForSingleObject(overlapped.hEvent, INFINITE);
|
||||
}
|
||||
CloseHandle(overlapped.hEvent);
|
||||
return sentSize;
|
||||
}
|
||||
#else
|
||||
Poco::Int64 _sendfile(poco_socket_t sd, FileIOS::NativeHandle fd, Poco::UInt64 offset,std::streamoff sentSize)
|
||||
{
|
||||
Poco::Int64 sent = 0;
|
||||
#ifdef __USE_LARGEFILE64
|
||||
sent = sendfile64(sd, fd, (off64_t *)&offset, sentSize);
|
||||
#else
|
||||
#if POCO_OS == POCO_OS_LINUX && !defined(POCO_EMSCRIPTEN)
|
||||
sent = sendfile(sd, fd, (off_t *)&offset, sentSize);
|
||||
#elif POCO_OS == POCO_OS_MAC_OS_X
|
||||
int result = sendfile(fd, sd, offset, &sentSize, nullptr, 0);
|
||||
if (result < 0)
|
||||
{
|
||||
sent = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sent = sentSize;
|
||||
}
|
||||
#else
|
||||
throw Poco::NotImplementedException("sendfile not implemented for this platform");
|
||||
#endif
|
||||
#endif
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
{
|
||||
sent = 0;
|
||||
}
|
||||
return sent;
|
||||
}
|
||||
|
||||
Poco::Int64 SocketImpl::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset)
|
||||
{
|
||||
FileIOS::NativeHandle fd = fileInputStream.nativeHandle();
|
||||
Poco::UInt64 fileSize = fileInputStream.size();
|
||||
std::streamoff sentSize = fileSize - offset;
|
||||
Poco::Int64 sent = 0;
|
||||
sighandler_t sigPrev = signal(SIGPIPE, SIG_IGN);
|
||||
while (sent == 0)
|
||||
{
|
||||
errno = 0;
|
||||
sent = _sendfile(_sockfd, fd, offset, sentSize);
|
||||
}
|
||||
signal(SIGPIPE, sigPrev != SIG_ERR ? sigPrev : SIG_DFL);
|
||||
return sent;
|
||||
}
|
||||
#endif // POCO_OS_FAMILY_WINDOWS
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
@ -213,5 +213,9 @@ void StreamSocket::sendUrgent(unsigned char data)
|
||||
impl()->sendUrgent(data);
|
||||
}
|
||||
|
||||
Poco::Int64 StreamSocket::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset)
|
||||
{
|
||||
return impl()->sendFile(fileInputStream, offset);
|
||||
}
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
@ -8,5 +8,5 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib
|
||||
|
@ -19,7 +19,10 @@
|
||||
#include "Poco/Net/NetException.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
|
||||
#include "Poco/FileStream.h"
|
||||
#include "Poco/File.h"
|
||||
#include "Poco/Path.h"
|
||||
#include <iostream>
|
||||
|
||||
using Poco::Net::Socket;
|
||||
using Poco::Net::SocketStream;
|
||||
@ -31,7 +34,9 @@ using Poco::Timespan;
|
||||
using Poco::Stopwatch;
|
||||
using Poco::TimeoutException;
|
||||
using Poco::InvalidArgumentException;
|
||||
|
||||
using Poco::FileInputStream;
|
||||
using Poco::FileOutputStream;
|
||||
using Poco::File;
|
||||
|
||||
SocketStreamTest::SocketStreamTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
@ -119,6 +124,62 @@ void SocketStreamTest::testEOF()
|
||||
ss.close();
|
||||
}
|
||||
|
||||
void SocketStreamTest::testSendFile()
|
||||
{
|
||||
const int fileSize = 64000;
|
||||
std::string payload(fileSize, 'x');
|
||||
Poco::Path testFilePath = Poco::Path::temp().append("test.sendfile.txt");
|
||||
const std::string fileName = testFilePath.toString();
|
||||
{
|
||||
File f(fileName);
|
||||
if (f.exists())
|
||||
{
|
||||
f.remove();
|
||||
}
|
||||
}
|
||||
FileOutputStream fout(fileName);
|
||||
fout << payload;
|
||||
fout.close();
|
||||
FileInputStream fin(fileName);
|
||||
EchoServer echoServer;
|
||||
StreamSocket ss;
|
||||
ss.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
|
||||
SocketStream str(ss);
|
||||
|
||||
Poco::UInt64 offset = 0;
|
||||
Poco::Int64 sent = 0;
|
||||
try
|
||||
{
|
||||
sent = ss.sendFile(fin);
|
||||
}
|
||||
catch (Poco::NotImplementedException &)
|
||||
{
|
||||
std::cout << "[NOT IMPLEMENTED]\n";
|
||||
return;
|
||||
}
|
||||
assertTrue(sent >= 0);
|
||||
while (sent < fileSize)
|
||||
{
|
||||
offset = sent;
|
||||
sent = ss.sendFile(fin, offset);
|
||||
assertTrue(sent >= 0);
|
||||
}
|
||||
str.flush();
|
||||
assertTrue (str.good());
|
||||
ss.shutdownSend();
|
||||
|
||||
assertTrue (str.gcount() == 0);
|
||||
char buffer[fileSize];
|
||||
str.read(buffer, sizeof(buffer));
|
||||
assertTrue (str.good());
|
||||
assertTrue (str.gcount() == fileSize);
|
||||
|
||||
ss.close();
|
||||
fin.close();
|
||||
File f(fileName);
|
||||
f.remove();
|
||||
}
|
||||
|
||||
void SocketStreamTest::setUp()
|
||||
{
|
||||
@ -137,6 +198,7 @@ CppUnit::Test* SocketStreamTest::suite()
|
||||
CppUnit_addTest(pSuite, SocketStreamTest, testStreamEcho);
|
||||
CppUnit_addTest(pSuite, SocketStreamTest, testLargeStreamEcho);
|
||||
CppUnit_addTest(pSuite, SocketStreamTest, testEOF);
|
||||
CppUnit_addTest(pSuite, SocketStreamTest, testSendFile);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
void testStreamEcho();
|
||||
void testLargeStreamEcho();
|
||||
void testEOF();
|
||||
void testSendFile();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
@ -13,7 +13,7 @@ vc.project.compiler.defines.shared = NetSSL_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\JSON\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include;..\\..\\Net\\include;..\\..\\Crypto\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -13,7 +13,7 @@ vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib Crypt32.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib Crypt32.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md =
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include;..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.project.linker.dependencies.debug_shared =
|
||||
vc.project.linker.dependencies.release_shared =
|
||||
vc.project.linker.dependencies.debug_static_md = Crypt32.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies = iphlpapi.lib mswsock.lib
|
||||
|
@ -13,5 +13,5 @@ vc.project.compiler.defines.shared =
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
|
@ -13,5 +13,5 @@ vc.project.compiler.defines.shared =
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -13,5 +13,5 @@ vc.project.compiler.defines.shared =
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
|
@ -13,5 +13,5 @@ vc.project.compiler.defines.shared =
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
vc.solution.create = true
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Util\\include;..\\..\\..\\XML\\include;..\\..\\..\\JSON\\include;..\\..\\..\\Net\\include;..\\..\\..\\Prometheus\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Net\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\JSON\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include
|
||||
vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user