mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-05-01 00:07:19 +02:00
Update POCO library.
This commit is contained in:
Vendored
+2
-1
@@ -19,7 +19,8 @@ objects = \
|
||||
MediaTypeTest QuotedPrintableTest DialogSocketTest \
|
||||
HTTPClientTestSuite FTPClientTestSuite FTPClientSessionTest \
|
||||
FTPStreamFactoryTest DialogServer \
|
||||
SocketReactorTest ReactorTestSuite \
|
||||
SocketReactorTest SocketConnectorTest ReactorTestSuite \
|
||||
SocketProactorTest \
|
||||
MailTestSuite MailMessageTest MailStreamTest \
|
||||
SMTPClientSessionTest POP3ClientSessionTest \
|
||||
RawSocketTest ICMPClientTest ICMPSocketTest ICMPClientTestSuite \
|
||||
|
||||
+1
@@ -7,5 +7,6 @@ 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.compiler.additionalOptions = /Zc:__cplusplus
|
||||
vc.project.linker.dependencies = iphlpapi.lib
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib
|
||||
|
||||
+199
-334
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
@@ -56,120 +56,109 @@
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
<_ProjectFileVersion>16.0.32602.291</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
@@ -205,6 +194,7 @@
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)d</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
@@ -243,11 +233,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -275,11 +265,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -304,11 +294,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -336,11 +326,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -365,11 +355,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -397,11 +387,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -426,11 +416,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -458,11 +448,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -487,11 +477,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -519,11 +509,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -548,11 +538,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -580,11 +570,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -598,268 +588,143 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\DatagramSocketTest.h"/>
|
||||
<ClInclude Include="src\DialogServer.h"/>
|
||||
<ClInclude Include="src\DialogSocketTest.h"/>
|
||||
<ClInclude Include="src\DNSTest.h"/>
|
||||
<ClInclude Include="src\EchoServer.h"/>
|
||||
<ClInclude Include="src\FTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\FTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\FTPStreamFactoryTest.h"/>
|
||||
<ClInclude Include="src\HTMLFormTest.h"/>
|
||||
<ClInclude Include="src\HTMLTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\HTTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPCookieTest.h"/>
|
||||
<ClInclude Include="src\HTTPCredentialsTest.h"/>
|
||||
<ClInclude Include="src\HTTPRequestTest.h"/>
|
||||
<ClInclude Include="src\HTTPResponseTest.h"/>
|
||||
<ClInclude Include="src\HTTPServerTest.h"/>
|
||||
<ClInclude Include="src\HTTPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPStreamFactoryTest.h"/>
|
||||
<ClInclude Include="src\HTTPTestServer.h"/>
|
||||
<ClInclude Include="src\HTTPTestSuite.h"/>
|
||||
<ClInclude Include="src\ICMPClientTest.h"/>
|
||||
<ClInclude Include="src\ICMPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\ICMPSocketTest.h"/>
|
||||
<ClInclude Include="src\IPAddressTest.h"/>
|
||||
<ClInclude Include="src\MailMessageTest.h"/>
|
||||
<ClInclude Include="src\MailStreamTest.h"/>
|
||||
<ClInclude Include="src\MailTestSuite.h"/>
|
||||
<ClInclude Include="src\MediaTypeTest.h"/>
|
||||
<ClInclude Include="src\MessageHeaderTest.h"/>
|
||||
<ClInclude Include="src\MessagesTestSuite.h"/>
|
||||
<ClInclude Include="src\MulticastEchoServer.h"/>
|
||||
<ClInclude Include="src\MulticastSocketTest.h"/>
|
||||
<ClInclude Include="src\MultipartReaderTest.h"/>
|
||||
<ClInclude Include="src\MultipartWriterTest.h"/>
|
||||
<ClInclude Include="src\NameValueCollectionTest.h"/>
|
||||
<ClInclude Include="src\NetCoreTestSuite.h"/>
|
||||
<ClInclude Include="src\NetTestSuite.h"/>
|
||||
<ClInclude Include="src\NetworkInterfaceTest.h"/>
|
||||
<ClInclude Include="src\NTLMCredentialsTest.h"/>
|
||||
<ClInclude Include="src\NTPClientTest.h"/>
|
||||
<ClInclude Include="src\NTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\OAuth10CredentialsTest.h"/>
|
||||
<ClInclude Include="src\OAuth20CredentialsTest.h"/>
|
||||
<ClInclude Include="src\OAuthTestSuite.h"/>
|
||||
<ClInclude Include="src\PollSetTest.h"/>
|
||||
<ClInclude Include="src\POP3ClientSessionTest.h"/>
|
||||
<ClInclude Include="src\QuotedPrintableTest.h"/>
|
||||
<ClInclude Include="src\RawSocketTest.h"/>
|
||||
<ClInclude Include="src\ReactorTestSuite.h"/>
|
||||
<ClInclude Include="src\SMTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\SocketAddressTest.h"/>
|
||||
<ClInclude Include="src\SocketReactorTest.h"/>
|
||||
<ClInclude Include="src\SocketsTestSuite.h"/>
|
||||
<ClInclude Include="src\SocketStreamTest.h"/>
|
||||
<ClInclude Include="src\SocketTest.h"/>
|
||||
<ClInclude Include="src\SyslogTest.h"/>
|
||||
<ClInclude Include="src\TCPServerTest.h"/>
|
||||
<ClInclude Include="src\TCPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\UDPEchoServer.h"/>
|
||||
<ClInclude Include="src\UDPServerTest.h"/>
|
||||
<ClInclude Include="src\UDPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\WebSocketTest.h"/>
|
||||
<ClInclude Include="src\WebSocketTestSuite.h"/>
|
||||
<ClInclude Include="src\DatagramSocketTest.h" />
|
||||
<ClInclude Include="src\DialogServer.h" />
|
||||
<ClInclude Include="src\DialogSocketTest.h" />
|
||||
<ClInclude Include="src\DNSTest.h" />
|
||||
<ClInclude Include="src\EchoServer.h" />
|
||||
<ClInclude Include="src\FTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\FTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\FTPStreamFactoryTest.h" />
|
||||
<ClInclude Include="src\HTMLFormTest.h" />
|
||||
<ClInclude Include="src\HTMLTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\HTTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPCookieTest.h" />
|
||||
<ClInclude Include="src\HTTPCredentialsTest.h" />
|
||||
<ClInclude Include="src\HTTPRequestTest.h" />
|
||||
<ClInclude Include="src\HTTPResponseTest.h" />
|
||||
<ClInclude Include="src\HTTPServerTest.h" />
|
||||
<ClInclude Include="src\HTTPServerTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPStreamFactoryTest.h" />
|
||||
<ClInclude Include="src\HTTPTestServer.h" />
|
||||
<ClInclude Include="src\HTTPTestSuite.h" />
|
||||
<ClInclude Include="src\ICMPClientTest.h" />
|
||||
<ClInclude Include="src\ICMPClientTestSuite.h" />
|
||||
<ClInclude Include="src\ICMPSocketTest.h" />
|
||||
<ClInclude Include="src\IPAddressTest.h" />
|
||||
<ClInclude Include="src\MailMessageTest.h" />
|
||||
<ClInclude Include="src\MailStreamTest.h" />
|
||||
<ClInclude Include="src\MailTestSuite.h" />
|
||||
<ClInclude Include="src\MediaTypeTest.h" />
|
||||
<ClInclude Include="src\MessageHeaderTest.h" />
|
||||
<ClInclude Include="src\MessagesTestSuite.h" />
|
||||
<ClInclude Include="src\MulticastEchoServer.h" />
|
||||
<ClInclude Include="src\MulticastSocketTest.h" />
|
||||
<ClInclude Include="src\MultipartReaderTest.h" />
|
||||
<ClInclude Include="src\MultipartWriterTest.h" />
|
||||
<ClInclude Include="src\NameValueCollectionTest.h" />
|
||||
<ClInclude Include="src\NetCoreTestSuite.h" />
|
||||
<ClInclude Include="src\NetTestSuite.h" />
|
||||
<ClInclude Include="src\NetworkInterfaceTest.h" />
|
||||
<ClInclude Include="src\NTLMCredentialsTest.h" />
|
||||
<ClInclude Include="src\NTPClientTest.h" />
|
||||
<ClInclude Include="src\NTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\OAuth10CredentialsTest.h" />
|
||||
<ClInclude Include="src\OAuth20CredentialsTest.h" />
|
||||
<ClInclude Include="src\OAuthTestSuite.h" />
|
||||
<ClInclude Include="src\PollSetTest.h" />
|
||||
<ClInclude Include="src\POP3ClientSessionTest.h" />
|
||||
<ClInclude Include="src\QuotedPrintableTest.h" />
|
||||
<ClInclude Include="src\RawSocketTest.h" />
|
||||
<ClInclude Include="src\ReactorTestSuite.h" />
|
||||
<ClInclude Include="src\SMTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\SocketAddressTest.h" />
|
||||
<ClInclude Include="src\SocketConnectorTest.h" />
|
||||
<ClInclude Include="src\SocketProactorTest.h" />
|
||||
<ClInclude Include="src\SocketReactorTest.h" />
|
||||
<ClInclude Include="src\SocketsTestSuite.h" />
|
||||
<ClInclude Include="src\SocketStreamTest.h" />
|
||||
<ClInclude Include="src\SocketTest.h" />
|
||||
<ClInclude Include="src\SyslogTest.h" />
|
||||
<ClInclude Include="src\TCPServerTest.h" />
|
||||
<ClInclude Include="src\TCPServerTestSuite.h" />
|
||||
<ClInclude Include="src\UDPEchoServer.h" />
|
||||
<ClInclude Include="src\UDPServerTest.h" />
|
||||
<ClInclude Include="src\UDPServerTestSuite.h" />
|
||||
<ClInclude Include="src\WebSocketTest.h" />
|
||||
<ClInclude Include="src\WebSocketTestSuite.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DatagramSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DNSTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPStreamFactoryTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLFormTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCookieTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPResponseTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStreamFactoryTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IPAddressTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessageTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailStreamTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MediaTypeTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessageHeaderTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessagesTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastEchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartReaderTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartWriterTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NameValueCollectionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetCoreTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetworkInterfaceTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTLMCredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth10CredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth20CredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuthTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PollSetTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\POP3ClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SMTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketAddressTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactorTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketsTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketStreamTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SyslogTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPEchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocketTest.cpp" />
|
||||
<ClCompile Include="src\DialogServer.cpp" />
|
||||
<ClCompile Include="src\DialogSocketTest.cpp" />
|
||||
<ClCompile Include="src\DNSTest.cpp" />
|
||||
<ClCompile Include="src\Driver.cpp" />
|
||||
<ClCompile Include="src\EchoServer.cpp" />
|
||||
<ClCompile Include="src\FTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\FTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\FTPStreamFactoryTest.cpp" />
|
||||
<ClCompile Include="src\HTMLFormTest.cpp" />
|
||||
<ClCompile Include="src\HTMLTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\HTTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPCookieTest.cpp" />
|
||||
<ClCompile Include="src\HTTPCredentialsTest.cpp" />
|
||||
<ClCompile Include="src\HTTPRequestTest.cpp" />
|
||||
<ClCompile Include="src\HTTPResponseTest.cpp" />
|
||||
<ClCompile Include="src\HTTPServerTest.cpp" />
|
||||
<ClCompile Include="src\HTTPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPStreamFactoryTest.cpp" />
|
||||
<ClCompile Include="src\HTTPTestServer.cpp" />
|
||||
<ClCompile Include="src\HTTPTestSuite.cpp" />
|
||||
<ClCompile Include="src\ICMPClientTest.cpp" />
|
||||
<ClCompile Include="src\ICMPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\ICMPSocketTest.cpp" />
|
||||
<ClCompile Include="src\IPAddressTest.cpp" />
|
||||
<ClCompile Include="src\MailMessageTest.cpp" />
|
||||
<ClCompile Include="src\MailStreamTest.cpp" />
|
||||
<ClCompile Include="src\MailTestSuite.cpp" />
|
||||
<ClCompile Include="src\MediaTypeTest.cpp" />
|
||||
<ClCompile Include="src\MessageHeaderTest.cpp" />
|
||||
<ClCompile Include="src\MessagesTestSuite.cpp" />
|
||||
<ClCompile Include="src\MulticastEchoServer.cpp" />
|
||||
<ClCompile Include="src\MulticastSocketTest.cpp" />
|
||||
<ClCompile Include="src\MultipartReaderTest.cpp" />
|
||||
<ClCompile Include="src\MultipartWriterTest.cpp" />
|
||||
<ClCompile Include="src\NameValueCollectionTest.cpp" />
|
||||
<ClCompile Include="src\NetCoreTestSuite.cpp" />
|
||||
<ClCompile Include="src\NetTestSuite.cpp" />
|
||||
<ClCompile Include="src\NetworkInterfaceTest.cpp" />
|
||||
<ClCompile Include="src\NTLMCredentialsTest.cpp" />
|
||||
<ClCompile Include="src\NTPClientTest.cpp" />
|
||||
<ClCompile Include="src\NTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\OAuth10CredentialsTest.cpp" />
|
||||
<ClCompile Include="src\OAuth20CredentialsTest.cpp" />
|
||||
<ClCompile Include="src\OAuthTestSuite.cpp" />
|
||||
<ClCompile Include="src\PollSetTest.cpp" />
|
||||
<ClCompile Include="src\POP3ClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\QuotedPrintableTest.cpp" />
|
||||
<ClCompile Include="src\RawSocketTest.cpp" />
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp" />
|
||||
<ClCompile Include="src\SMTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\SocketAddressTest.cpp" />
|
||||
<ClCompile Include="src\SocketConnectorTest.cpp" />
|
||||
<ClCompile Include="src\SocketProactorTest.cpp" />
|
||||
<ClCompile Include="src\SocketReactorTest.cpp" />
|
||||
<ClCompile Include="src\SocketsTestSuite.cpp" />
|
||||
<ClCompile Include="src\SocketStreamTest.cpp" />
|
||||
<ClCompile Include="src\SocketTest.cpp" />
|
||||
<ClCompile Include="src\SyslogTest.cpp" />
|
||||
<ClCompile Include="src\TCPServerTest.cpp" />
|
||||
<ClCompile Include="src\TCPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\UDPEchoServer.cpp" />
|
||||
<ClCompile Include="src\UDPServerTest.cpp" />
|
||||
<ClCompile Include="src\UDPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\WebSocketTest.cpp" />
|
||||
<ClCompile Include="src\WebSocketTestSuite.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+68
-56
@@ -2,172 +2,172 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="NetCore">
|
||||
<UniqueIdentifier>{622ba277-a191-45e4-be4d-b0c9634aae2a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{96f14e15-814c-4289-abea-e829b3d3b60d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Header Files">
|
||||
<UniqueIdentifier>{b988e6c9-804a-4688-a317-b2ec7fb6a1d6}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{c06a4c37-b293-43eb-bb8b-14816b1082c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Source Files">
|
||||
<UniqueIdentifier>{1c8d6d1a-2a86-4319-825d-57d72ed5be7e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4a3b9db1-16f4-4d13-8157-3cc3a7a7d580}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{161f9d3f-3600-4728-bc5e-316da9795ff8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b2999ec8-cd74-461d-a1a2-35d796e00578}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{ac02c0d6-c130-4249-9b88-e1e2241528ed}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4dc23a9a-a4cd-4b30-8b66-8bcef117e052}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{c8b1d3f2-67be-4b6c-9a3e-c7f681204369}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{39a278fe-fd8e-49e6-a785-4adb054f80e4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{fca74574-ebb7-4b9d-8107-0160aad38a51}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{93cdb6e9-2604-44dc-8fe3-5a5eb24851a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{4a90f67a-ce30-493b-bc2d-fdb4ec6022a0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7ee54e59-a03a-4da5-a09f-54e6a81772bd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets">
|
||||
<UniqueIdentifier>{79e1d000-adea-47a6-80b2-2e1eb656f37f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0c2bcd77-b533-4f82-8dd4-e3eeebb6d021}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Header Files">
|
||||
<UniqueIdentifier>{f792bde2-f64f-4641-826b-73565b73d7c8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7ec5729e-cca0-43ca-88c2-9a3d09fcda02}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Source Files">
|
||||
<UniqueIdentifier>{7fd6b663-b256-4344-b727-a10bd3969a3f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a9adab65-db3e-4bc2-89f2-ff794b18a9ad}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages">
|
||||
<UniqueIdentifier>{7011dda2-614e-4220-b8fe-37fb957e491f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4023275d-3429-416e-948e-def4f98a6160}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Header Files">
|
||||
<UniqueIdentifier>{dc379e2f-3309-4627-b249-64837bea0684}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{569d9a23-832d-47a0-a5cd-838612de62a2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Source Files">
|
||||
<UniqueIdentifier>{35f107fb-8aed-42dc-a048-0b7cfe2a8358}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d2b8533c-1aaa-49c0-88b8-d847ecf4a146}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP">
|
||||
<UniqueIdentifier>{44aa1462-1a4b-4432-92a1-99689bc524dd}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f9fb1f18-9c37-43ff-99db-436ee94e38d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Header Files">
|
||||
<UniqueIdentifier>{a997bdca-0c5c-420e-954d-1245fe0af3a9}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{3208329c-2707-493f-b750-4940b78cb78a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Source Files">
|
||||
<UniqueIdentifier>{378356d8-4f3f-423d-8bfa-d1ecce02dd60}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{659ed528-6cf1-4444-92ef-23aa0bbf675d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer">
|
||||
<UniqueIdentifier>{37b2db36-1de3-434d-a5ee-b91d685dc225}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{30c0386a-45af-4223-b822-1cc9d695b35b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Header Files">
|
||||
<UniqueIdentifier>{cb9f5c49-610a-4737-8b83-0f3e687efbb2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{979d2fc8-0eca-4b74-b898-d8f79d88a19d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Source Files">
|
||||
<UniqueIdentifier>{71f8d2a9-361b-4e88-b9ed-8e974d03d6c5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{bb1a0294-9b8f-4107-8d4a-4241e65e7418}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer">
|
||||
<UniqueIdentifier>{2e959e74-d55d-450a-8860-6db234dd4916}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e9a5d533-e965-4745-b51e-aafa331b5b16}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Header Files">
|
||||
<UniqueIdentifier>{804e9b7e-c1b1-4cb8-ad14-b159de2c4e53}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6792084c-89e0-4168-84a2-d50879660267}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Source Files">
|
||||
<UniqueIdentifier>{ebc9766b-4375-4a56-9469-5c29c730607f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6771c8ef-5970-48d0-b5ef-d20a4af9c7a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML">
|
||||
<UniqueIdentifier>{0a95781f-7fcc-4a8c-b21b-6666392f150c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d439ba84-6278-4c1c-b5c2-b09d6a143391}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Header Files">
|
||||
<UniqueIdentifier>{8d731e3a-6f29-448a-b27c-95c557bd9d85}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0d42a251-1f30-4b56-ada1-698f6d3b8732}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Source Files">
|
||||
<UniqueIdentifier>{6c343779-354c-4581-93c8-8a39316eaef7}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f42f60bb-c2d7-4116-827c-fa13562d7ecc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient">
|
||||
<UniqueIdentifier>{f01cd53d-2f73-4ea5-9864-caa20ce1429b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6d42fb23-de81-499a-a9d4-0d4b1fda2130}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Header Files">
|
||||
<UniqueIdentifier>{bca2d7d7-6ee8-45dd-965a-969097c0cbbd}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d4ba9f84-b833-41d8-8738-25a4d5c762fa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Source Files">
|
||||
<UniqueIdentifier>{e6446708-9ff2-4aee-b43d-b36cf779619b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{73815ea0-843e-45ae-8fcb-8c5d5cb43def}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient">
|
||||
<UniqueIdentifier>{10fe3129-3d2e-4529-b7ed-9f80378cc34e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e69138c0-5256-48f5-8245-667ed2074aee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Header Files">
|
||||
<UniqueIdentifier>{dcf405bb-f42a-402c-93d5-6c6499d9560d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{de7024c9-967f-4548-acc9-aa9a0d4a2233}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Source Files">
|
||||
<UniqueIdentifier>{947205b8-420a-4c55-93bb-8f0fbf91a0df}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4662b1a8-f31e-49ac-86a2-43ff6f18c4ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor">
|
||||
<UniqueIdentifier>{74eb0a31-b0d6-499a-94c3-3b7311b95e60}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f5ee2a9b-28fd-4f0d-a470-b56c93817af6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Header Files">
|
||||
<UniqueIdentifier>{72e6e2a6-e072-48cd-9ce9-ace17c4ccffb}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{be916e59-b8a8-49d5-a1d9-fe4ec09b557c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Source Files">
|
||||
<UniqueIdentifier>{c8a70797-7336-4edf-baa5-82987ea81a2e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6d061e4a-a7e9-4fb8-9dcc-22c40d170167}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail">
|
||||
<UniqueIdentifier>{2207a262-010d-46f1-b374-49be8dc6ed45}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5bc87c88-b8a1-43b9-8872-00db48dbe766}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Header Files">
|
||||
<UniqueIdentifier>{283db660-d575-4df5-9bff-541801664ebe}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{28c693e8-b038-4ae0-bb98-9d8c164bcefc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Source Files">
|
||||
<UniqueIdentifier>{073b550b-d77e-41b7-977f-004a21501922}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9d0c793e-4e60-4970-adb4-5aebbd9e9323}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP">
|
||||
<UniqueIdentifier>{b3c92e30-fbb0-4cd0-a2ea-107fe77799df}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e83b0755-7b3a-40bc-9a78-de68d7f7c125}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Header Files">
|
||||
<UniqueIdentifier>{f560cb9a-5e6d-4886-9d98-51b551c23a27}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0e507ca9-1538-4170-bfe5-1f09bb5b2bec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Source Files">
|
||||
<UniqueIdentifier>{d5d1c60e-abb4-48c6-9c6f-adb0a11e47db}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2717e923-8f4c-4d2b-8e4f-81dca96801c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP">
|
||||
<UniqueIdentifier>{8e4804ca-223b-48f2-ac89-fbacc8c250ef}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2f1e77d0-cde4-4084-baf9-84a11226b874}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Header Files">
|
||||
<UniqueIdentifier>{e6e23ca2-4c0b-4cb5-ab56-492808cdc4c4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{667dba9d-a815-4a2e-8c69-6d59ff02fee7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Source Files">
|
||||
<UniqueIdentifier>{1e2d9162-aeb9-4c6f-87f4-e2fd921fead3}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{1e8006ae-8f33-40c0-842b-ba5870b2d59f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging">
|
||||
<UniqueIdentifier>{1aec120d-a164-4801-8ce8-2a07c66e949b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6d54692c-5892-4f9a-abae-070158e64e35}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Header Files">
|
||||
<UniqueIdentifier>{fc560f2a-0deb-4b0e-89e9-a9cc45efb839}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4cace072-1c95-4d12-9691-301e4f9c809d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Source Files">
|
||||
<UniqueIdentifier>{60126318-8b4e-40b0-abef-596fb8325889}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{95863a72-6780-403c-b324-8ecb6a7f77a8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket">
|
||||
<UniqueIdentifier>{fd382fec-1d47-4a46-b748-cadbd24b328d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{732e449c-3404-4b30-902c-e93c5d70c4d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Header Files">
|
||||
<UniqueIdentifier>{93aec30b-4d67-4e45-bf30-5009162a00a8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{667f145c-7e55-4ea6-97ad-ac93604789ab}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Source Files">
|
||||
<UniqueIdentifier>{091ca473-b07f-440d-8529-ff49698f165a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4924cbab-95da-462a-a689-748b407b293b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth">
|
||||
<UniqueIdentifier>{d812eedb-b616-448f-af07-6a13f0d82117}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{90cd5600-34dd-4d3d-aadf-e2f459418a70}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Header Files">
|
||||
<UniqueIdentifier>{63a2c039-855d-476c-8b25-f6e12802831f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{078f2145-c2c7-42dd-9922-671b2ef2f89e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Source Files">
|
||||
<UniqueIdentifier>{c15f795b-fe8e-4f77-88f4-c61ca7771e0f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5c69730c-de7f-48b9-b4fb-4fa75f547eaa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP">
|
||||
<UniqueIdentifier>{33883842-d74a-4b75-ae61-26e7877c77e1}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{c7d3eb75-2cf8-46e7-bc76-b0d62aed0b10}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Source Files">
|
||||
<UniqueIdentifier>{3e6c33d7-2d63-48e9-b78c-acf9bc745ca4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ed08e706-78fa-435b-863a-02177dcb5e67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Header Files">
|
||||
<UniqueIdentifier>{3cdaed90-d152-4ce6-a0a8-6978a3b6e2d6}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{1f474979-aae7-49ed-8ee3-8182a45fc581}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -306,9 +306,15 @@
|
||||
<ClInclude Include="src\ReactorTestSuite.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketConnectorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketReactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketProactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MailMessageTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -503,9 +509,15 @@
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketConnectorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketProactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessageTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
+202
-334
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
@@ -55,121 +55,111 @@
|
||||
<ProjectGuid>{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
<_ProjectFileVersion>16.0.32602.291</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
@@ -205,6 +195,7 @@
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)d</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
@@ -215,6 +206,7 @@
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)d</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
@@ -225,6 +217,7 @@
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)d</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
@@ -243,11 +236,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -275,11 +268,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -304,11 +297,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -336,11 +329,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -365,11 +358,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -397,11 +390,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -426,11 +419,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -458,11 +451,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -487,11 +480,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -519,11 +512,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -548,11 +541,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -580,11 +573,11 @@
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -598,268 +591,143 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\DatagramSocketTest.h"/>
|
||||
<ClInclude Include="src\DialogServer.h"/>
|
||||
<ClInclude Include="src\DialogSocketTest.h"/>
|
||||
<ClInclude Include="src\DNSTest.h"/>
|
||||
<ClInclude Include="src\EchoServer.h"/>
|
||||
<ClInclude Include="src\FTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\FTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\FTPStreamFactoryTest.h"/>
|
||||
<ClInclude Include="src\HTMLFormTest.h"/>
|
||||
<ClInclude Include="src\HTMLTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\HTTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPCookieTest.h"/>
|
||||
<ClInclude Include="src\HTTPCredentialsTest.h"/>
|
||||
<ClInclude Include="src\HTTPRequestTest.h"/>
|
||||
<ClInclude Include="src\HTTPResponseTest.h"/>
|
||||
<ClInclude Include="src\HTTPServerTest.h"/>
|
||||
<ClInclude Include="src\HTTPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\HTTPStreamFactoryTest.h"/>
|
||||
<ClInclude Include="src\HTTPTestServer.h"/>
|
||||
<ClInclude Include="src\HTTPTestSuite.h"/>
|
||||
<ClInclude Include="src\ICMPClientTest.h"/>
|
||||
<ClInclude Include="src\ICMPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\ICMPSocketTest.h"/>
|
||||
<ClInclude Include="src\IPAddressTest.h"/>
|
||||
<ClInclude Include="src\MailMessageTest.h"/>
|
||||
<ClInclude Include="src\MailStreamTest.h"/>
|
||||
<ClInclude Include="src\MailTestSuite.h"/>
|
||||
<ClInclude Include="src\MediaTypeTest.h"/>
|
||||
<ClInclude Include="src\MessageHeaderTest.h"/>
|
||||
<ClInclude Include="src\MessagesTestSuite.h"/>
|
||||
<ClInclude Include="src\MulticastEchoServer.h"/>
|
||||
<ClInclude Include="src\MulticastSocketTest.h"/>
|
||||
<ClInclude Include="src\MultipartReaderTest.h"/>
|
||||
<ClInclude Include="src\MultipartWriterTest.h"/>
|
||||
<ClInclude Include="src\NameValueCollectionTest.h"/>
|
||||
<ClInclude Include="src\NetCoreTestSuite.h"/>
|
||||
<ClInclude Include="src\NetTestSuite.h"/>
|
||||
<ClInclude Include="src\NetworkInterfaceTest.h"/>
|
||||
<ClInclude Include="src\NTLMCredentialsTest.h"/>
|
||||
<ClInclude Include="src\NTPClientTest.h"/>
|
||||
<ClInclude Include="src\NTPClientTestSuite.h"/>
|
||||
<ClInclude Include="src\OAuth10CredentialsTest.h"/>
|
||||
<ClInclude Include="src\OAuth20CredentialsTest.h"/>
|
||||
<ClInclude Include="src\OAuthTestSuite.h"/>
|
||||
<ClInclude Include="src\PollSetTest.h"/>
|
||||
<ClInclude Include="src\POP3ClientSessionTest.h"/>
|
||||
<ClInclude Include="src\QuotedPrintableTest.h"/>
|
||||
<ClInclude Include="src\RawSocketTest.h"/>
|
||||
<ClInclude Include="src\ReactorTestSuite.h"/>
|
||||
<ClInclude Include="src\SMTPClientSessionTest.h"/>
|
||||
<ClInclude Include="src\SocketAddressTest.h"/>
|
||||
<ClInclude Include="src\SocketReactorTest.h"/>
|
||||
<ClInclude Include="src\SocketsTestSuite.h"/>
|
||||
<ClInclude Include="src\SocketStreamTest.h"/>
|
||||
<ClInclude Include="src\SocketTest.h"/>
|
||||
<ClInclude Include="src\SyslogTest.h"/>
|
||||
<ClInclude Include="src\TCPServerTest.h"/>
|
||||
<ClInclude Include="src\TCPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\UDPEchoServer.h"/>
|
||||
<ClInclude Include="src\UDPServerTest.h"/>
|
||||
<ClInclude Include="src\UDPServerTestSuite.h"/>
|
||||
<ClInclude Include="src\WebSocketTest.h"/>
|
||||
<ClInclude Include="src\WebSocketTestSuite.h"/>
|
||||
<ClInclude Include="src\DatagramSocketTest.h" />
|
||||
<ClInclude Include="src\DialogServer.h" />
|
||||
<ClInclude Include="src\DialogSocketTest.h" />
|
||||
<ClInclude Include="src\DNSTest.h" />
|
||||
<ClInclude Include="src\EchoServer.h" />
|
||||
<ClInclude Include="src\FTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\FTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\FTPStreamFactoryTest.h" />
|
||||
<ClInclude Include="src\HTMLFormTest.h" />
|
||||
<ClInclude Include="src\HTMLTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\HTTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPCookieTest.h" />
|
||||
<ClInclude Include="src\HTTPCredentialsTest.h" />
|
||||
<ClInclude Include="src\HTTPRequestTest.h" />
|
||||
<ClInclude Include="src\HTTPResponseTest.h" />
|
||||
<ClInclude Include="src\HTTPServerTest.h" />
|
||||
<ClInclude Include="src\HTTPServerTestSuite.h" />
|
||||
<ClInclude Include="src\HTTPStreamFactoryTest.h" />
|
||||
<ClInclude Include="src\HTTPTestServer.h" />
|
||||
<ClInclude Include="src\HTTPTestSuite.h" />
|
||||
<ClInclude Include="src\ICMPClientTest.h" />
|
||||
<ClInclude Include="src\ICMPClientTestSuite.h" />
|
||||
<ClInclude Include="src\ICMPSocketTest.h" />
|
||||
<ClInclude Include="src\IPAddressTest.h" />
|
||||
<ClInclude Include="src\MailMessageTest.h" />
|
||||
<ClInclude Include="src\MailStreamTest.h" />
|
||||
<ClInclude Include="src\MailTestSuite.h" />
|
||||
<ClInclude Include="src\MediaTypeTest.h" />
|
||||
<ClInclude Include="src\MessageHeaderTest.h" />
|
||||
<ClInclude Include="src\MessagesTestSuite.h" />
|
||||
<ClInclude Include="src\MulticastEchoServer.h" />
|
||||
<ClInclude Include="src\MulticastSocketTest.h" />
|
||||
<ClInclude Include="src\MultipartReaderTest.h" />
|
||||
<ClInclude Include="src\MultipartWriterTest.h" />
|
||||
<ClInclude Include="src\NameValueCollectionTest.h" />
|
||||
<ClInclude Include="src\NetCoreTestSuite.h" />
|
||||
<ClInclude Include="src\NetTestSuite.h" />
|
||||
<ClInclude Include="src\NetworkInterfaceTest.h" />
|
||||
<ClInclude Include="src\NTLMCredentialsTest.h" />
|
||||
<ClInclude Include="src\NTPClientTest.h" />
|
||||
<ClInclude Include="src\NTPClientTestSuite.h" />
|
||||
<ClInclude Include="src\OAuth10CredentialsTest.h" />
|
||||
<ClInclude Include="src\OAuth20CredentialsTest.h" />
|
||||
<ClInclude Include="src\OAuthTestSuite.h" />
|
||||
<ClInclude Include="src\PollSetTest.h" />
|
||||
<ClInclude Include="src\POP3ClientSessionTest.h" />
|
||||
<ClInclude Include="src\QuotedPrintableTest.h" />
|
||||
<ClInclude Include="src\RawSocketTest.h" />
|
||||
<ClInclude Include="src\ReactorTestSuite.h" />
|
||||
<ClInclude Include="src\SMTPClientSessionTest.h" />
|
||||
<ClInclude Include="src\SocketAddressTest.h" />
|
||||
<ClInclude Include="src\SocketConnectorTest.h" />
|
||||
<ClInclude Include="src\SocketProactorTest.h" />
|
||||
<ClInclude Include="src\SocketReactorTest.h" />
|
||||
<ClInclude Include="src\SocketsTestSuite.h" />
|
||||
<ClInclude Include="src\SocketStreamTest.h" />
|
||||
<ClInclude Include="src\SocketTest.h" />
|
||||
<ClInclude Include="src\SyslogTest.h" />
|
||||
<ClInclude Include="src\TCPServerTest.h" />
|
||||
<ClInclude Include="src\TCPServerTestSuite.h" />
|
||||
<ClInclude Include="src\UDPEchoServer.h" />
|
||||
<ClInclude Include="src\UDPServerTest.h" />
|
||||
<ClInclude Include="src\UDPServerTestSuite.h" />
|
||||
<ClInclude Include="src\WebSocketTest.h" />
|
||||
<ClInclude Include="src\WebSocketTestSuite.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DatagramSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DNSTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPStreamFactoryTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLFormTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCookieTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPResponseTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStreamFactoryTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IPAddressTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessageTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailStreamTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MediaTypeTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessageHeaderTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessagesTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastEchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartReaderTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartWriterTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NameValueCollectionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetCoreTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetworkInterfaceTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTLMCredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth10CredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth20CredentialsTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuthTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PollSetTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\POP3ClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SMTPClientSessionTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketAddressTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactorTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketsTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketStreamTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SyslogTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPEchoServer.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocketTest.cpp" />
|
||||
<ClCompile Include="src\DialogServer.cpp" />
|
||||
<ClCompile Include="src\DialogSocketTest.cpp" />
|
||||
<ClCompile Include="src\DNSTest.cpp" />
|
||||
<ClCompile Include="src\Driver.cpp" />
|
||||
<ClCompile Include="src\EchoServer.cpp" />
|
||||
<ClCompile Include="src\FTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\FTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\FTPStreamFactoryTest.cpp" />
|
||||
<ClCompile Include="src\HTMLFormTest.cpp" />
|
||||
<ClCompile Include="src\HTMLTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\HTTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPCookieTest.cpp" />
|
||||
<ClCompile Include="src\HTTPCredentialsTest.cpp" />
|
||||
<ClCompile Include="src\HTTPRequestTest.cpp" />
|
||||
<ClCompile Include="src\HTTPResponseTest.cpp" />
|
||||
<ClCompile Include="src\HTTPServerTest.cpp" />
|
||||
<ClCompile Include="src\HTTPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\HTTPStreamFactoryTest.cpp" />
|
||||
<ClCompile Include="src\HTTPTestServer.cpp" />
|
||||
<ClCompile Include="src\HTTPTestSuite.cpp" />
|
||||
<ClCompile Include="src\ICMPClientTest.cpp" />
|
||||
<ClCompile Include="src\ICMPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\ICMPSocketTest.cpp" />
|
||||
<ClCompile Include="src\IPAddressTest.cpp" />
|
||||
<ClCompile Include="src\MailMessageTest.cpp" />
|
||||
<ClCompile Include="src\MailStreamTest.cpp" />
|
||||
<ClCompile Include="src\MailTestSuite.cpp" />
|
||||
<ClCompile Include="src\MediaTypeTest.cpp" />
|
||||
<ClCompile Include="src\MessageHeaderTest.cpp" />
|
||||
<ClCompile Include="src\MessagesTestSuite.cpp" />
|
||||
<ClCompile Include="src\MulticastEchoServer.cpp" />
|
||||
<ClCompile Include="src\MulticastSocketTest.cpp" />
|
||||
<ClCompile Include="src\MultipartReaderTest.cpp" />
|
||||
<ClCompile Include="src\MultipartWriterTest.cpp" />
|
||||
<ClCompile Include="src\NameValueCollectionTest.cpp" />
|
||||
<ClCompile Include="src\NetCoreTestSuite.cpp" />
|
||||
<ClCompile Include="src\NetTestSuite.cpp" />
|
||||
<ClCompile Include="src\NetworkInterfaceTest.cpp" />
|
||||
<ClCompile Include="src\NTLMCredentialsTest.cpp" />
|
||||
<ClCompile Include="src\NTPClientTest.cpp" />
|
||||
<ClCompile Include="src\NTPClientTestSuite.cpp" />
|
||||
<ClCompile Include="src\OAuth10CredentialsTest.cpp" />
|
||||
<ClCompile Include="src\OAuth20CredentialsTest.cpp" />
|
||||
<ClCompile Include="src\OAuthTestSuite.cpp" />
|
||||
<ClCompile Include="src\PollSetTest.cpp" />
|
||||
<ClCompile Include="src\POP3ClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\QuotedPrintableTest.cpp" />
|
||||
<ClCompile Include="src\RawSocketTest.cpp" />
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp" />
|
||||
<ClCompile Include="src\SMTPClientSessionTest.cpp" />
|
||||
<ClCompile Include="src\SocketAddressTest.cpp" />
|
||||
<ClCompile Include="src\SocketConnectorTest.cpp" />
|
||||
<ClCompile Include="src\SocketProactorTest.cpp" />
|
||||
<ClCompile Include="src\SocketReactorTest.cpp" />
|
||||
<ClCompile Include="src\SocketsTestSuite.cpp" />
|
||||
<ClCompile Include="src\SocketStreamTest.cpp" />
|
||||
<ClCompile Include="src\SocketTest.cpp" />
|
||||
<ClCompile Include="src\SyslogTest.cpp" />
|
||||
<ClCompile Include="src\TCPServerTest.cpp" />
|
||||
<ClCompile Include="src\TCPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\UDPEchoServer.cpp" />
|
||||
<ClCompile Include="src\UDPServerTest.cpp" />
|
||||
<ClCompile Include="src\UDPServerTestSuite.cpp" />
|
||||
<ClCompile Include="src\WebSocketTest.cpp" />
|
||||
<ClCompile Include="src\WebSocketTestSuite.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+68
-56
@@ -2,172 +2,172 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="NetCore">
|
||||
<UniqueIdentifier>{5404fe11-1839-42cf-b51b-5e9b1bf04564}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5dbf52e2-36b3-4227-bdfc-313e4c904adc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Header Files">
|
||||
<UniqueIdentifier>{10186ea1-7b50-4382-a510-7b7827a7207c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{58ab66cd-dbbe-4e72-93f8-6efefe8f3995}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Source Files">
|
||||
<UniqueIdentifier>{ae58791f-549f-4b44-a83e-1c8e981425d9}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b6a24e46-eb3d-4436-b7b6-4fe5873d4fd0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{b5e10af2-6504-4d51-b9bb-8fdcc895740e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{eee07f06-f40a-4d2b-90ee-28f693cc0dff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{83d98686-03a5-4c51-834e-c617171b2372}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f31edf18-4407-4e08-aa97-8dc117ef9c91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{7c7b7a3c-be0a-4c00-b81d-8d5636a94767}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{aae585db-82e2-4111-8b20-e7b35a96c904}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{85626f7e-1bc7-4e2a-bded-b47552f95574}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6d1f01b7-6aa6-4297-a304-1b2564620b53}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{e08a68c0-01cd-4753-958b-f4f6e5d27627}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{97a2650f-435a-4293-bfde-6fdae1251e05}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets">
|
||||
<UniqueIdentifier>{bd610a87-2c11-4b32-9bd9-042a244125fc}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{544c7b99-bea0-409e-970e-5cd4d7cb8b78}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Header Files">
|
||||
<UniqueIdentifier>{dec36758-f59d-4e4c-a25f-60302fb31b87}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{cd90a289-8d18-40ee-8a7e-85184fe5cf1c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Source Files">
|
||||
<UniqueIdentifier>{2ddff7b2-4071-4aa1-abbd-2756fcbc8795}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fc005db9-81d8-4b28-98d3-bbd6acc497b3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages">
|
||||
<UniqueIdentifier>{f2c1ecd0-fd56-4db2-b974-2b354f181b85}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9a67a4bf-571c-41cc-a611-de9d6cc397f3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Header Files">
|
||||
<UniqueIdentifier>{d986b7e9-9850-43e6-bb62-35b020b45498}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{3cd09893-9446-4981-8413-9f70611e6f72}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Source Files">
|
||||
<UniqueIdentifier>{78d5fa55-df7f-4ac0-acc3-84eb2c3f2790}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f6d55c6d-3b92-47de-8f77-ad154548ec09}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP">
|
||||
<UniqueIdentifier>{37a26ed5-0669-4b93-b073-4ad2ddd74711}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ce179bde-8991-45ea-86b7-e229230cdebb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Header Files">
|
||||
<UniqueIdentifier>{3b5a355c-5a87-48ea-99ff-90d03acdc416}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fbc550e6-b854-4257-be7b-cf4f02cc31ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Source Files">
|
||||
<UniqueIdentifier>{408f258a-a4b2-4a72-8e60-f4ef1e332f3a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{89ffa61e-c01e-4c15-9da8-58fb4fe362f1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer">
|
||||
<UniqueIdentifier>{8e863afc-c74d-4bf8-97d6-7d18904b3508}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0a9fd4be-af13-49b1-b892-205c93523ead}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Header Files">
|
||||
<UniqueIdentifier>{fb04e1c3-43c7-48e4-89d2-44d6d94dc04d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2e2f50ee-e05e-4b6e-b591-ad83996d2dfb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Source Files">
|
||||
<UniqueIdentifier>{44d881cd-afce-4c66-8d8a-dcd23d2d87e1}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{09e946ef-06a5-44c9-a73f-de3b695bbc72}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer">
|
||||
<UniqueIdentifier>{5c5e3271-c1f7-4c28-8ead-aa6e9bee6748}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4ef2273d-2d80-442b-bdbe-5dd047fae2c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Header Files">
|
||||
<UniqueIdentifier>{c4a7c94f-7e34-4cd6-a241-950f0741556f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2207492d-3e67-45f6-944f-0be8c7efbd15}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Source Files">
|
||||
<UniqueIdentifier>{aa27a296-ccc2-4c88-adf3-42adc36260e8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0a8f6c27-4102-45ac-b91e-d0e5fdaa1a6d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML">
|
||||
<UniqueIdentifier>{55bb0826-ebfa-4cf2-a47a-ae75b9cdeed9}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{aab2565e-5ffe-49a2-b625-9e618ca84ad7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Header Files">
|
||||
<UniqueIdentifier>{fa6cf3da-cf9d-4bef-8db7-152f22829f4d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{c77e3731-e407-407c-af72-320628244900}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Source Files">
|
||||
<UniqueIdentifier>{9e2454f2-772e-4427-98f4-f0f4ce0c6925}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d11ef2a6-c79a-4fb0-9833-f21b21bc3ebd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient">
|
||||
<UniqueIdentifier>{b6d09883-3564-495d-b791-2e40a176fc61}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{898d6c2d-db0c-46dc-9ce6-201dee10b76f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Header Files">
|
||||
<UniqueIdentifier>{e6aafcd8-9d02-4bbb-83c5-ea9ad3fef134}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{880bbec3-2850-4a37-8047-b2679330e5ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Source Files">
|
||||
<UniqueIdentifier>{e3a724a8-20a5-429e-9d40-8858a9d01f0c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{12cf9be6-71df-48ed-98a5-c3aea1c5b269}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient">
|
||||
<UniqueIdentifier>{33437c8a-12d1-4e8b-b07c-a3f323fd0c20}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{135927d4-fa42-49f1-8dec-0ec71eaca427}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Header Files">
|
||||
<UniqueIdentifier>{6868bd64-4e26-4f39-9b08-2f91808366df}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{62676cf3-e39f-400b-a1d7-52881e8105c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Source Files">
|
||||
<UniqueIdentifier>{e74c2849-e607-4bb4-87e6-64afebdeb545}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{3511a634-fa99-4892-b4e2-7547c842d934}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor">
|
||||
<UniqueIdentifier>{13e2d91e-f72a-4514-9583-e4dc6b9689b4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{04d2b390-eb35-4a00-8d91-866e807e7086}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Header Files">
|
||||
<UniqueIdentifier>{cc0ac382-4e88-4138-8024-ad74e9afc620}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{69bf1aea-2f85-4cec-be08-1e5977368372}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Source Files">
|
||||
<UniqueIdentifier>{47311622-fec5-4776-9a58-6fbd1e3483f8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{46cbecec-83dc-4625-8091-61403d9ac93e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail">
|
||||
<UniqueIdentifier>{aea5befd-5e2a-447c-b18e-2740e2acee4f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{457a32db-452d-4687-af86-1706d713f84d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Header Files">
|
||||
<UniqueIdentifier>{36e4ed28-695d-459a-a3f7-2c2721fe2436}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7000fb97-acce-4573-882e-a64413896e0d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Source Files">
|
||||
<UniqueIdentifier>{722b1dd1-df29-4355-a6f5-1f815c8a725b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fa99694a-a128-4713-ad97-54430747efae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP">
|
||||
<UniqueIdentifier>{dbac1bff-a6c6-4df1-bdb4-5735cf8449eb}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{683b8298-1187-4b29-8d68-2eb626c4b626}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Header Files">
|
||||
<UniqueIdentifier>{79c4656f-eeb7-4c3d-8407-1248c85ed8e4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{603d6d0c-4fc3-4919-95df-ba61733b8a55}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Source Files">
|
||||
<UniqueIdentifier>{365c6961-c825-4a86-8174-a94127246964}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a3dc0316-7858-4aa7-a509-e2b45144546a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP">
|
||||
<UniqueIdentifier>{915093c8-89bb-447f-9c20-b3201217d614}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7c386d3e-213f-44ba-a4c9-2e8efbb18b11}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Header Files">
|
||||
<UniqueIdentifier>{2463d6e8-5890-47c3-ade5-eabaf4f28d28}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a116cee8-ebbc-4d58-9c9e-f4c6907e5d67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Source Files">
|
||||
<UniqueIdentifier>{76b06a55-58f5-4882-99f1-d4090e04749a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d51c8ca0-f358-4f10-9545-755d6fe64863}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging">
|
||||
<UniqueIdentifier>{658b80fd-2488-4dca-b6a5-5a611a7ce819}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a6d4b915-5f2f-46be-bea9-a38c80446035}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Header Files">
|
||||
<UniqueIdentifier>{46be7d47-7ac6-4967-b70d-00c565725876}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{55342d23-3ff9-4215-b7b5-f9df4427fc83}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Source Files">
|
||||
<UniqueIdentifier>{113f49c9-3a26-4e27-a74a-8e06ddfe3bce}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{62bf02c3-14b1-4846-b20c-03cd34209c14}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket">
|
||||
<UniqueIdentifier>{203af477-d3f1-4677-a83d-043d0b814a9e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{72e0e2b0-e862-4f3c-911b-b75701e2af0e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Header Files">
|
||||
<UniqueIdentifier>{60f8307a-59f6-43c9-a2a3-7c088bc6fa48}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ccafe570-fb71-4f94-b264-559d438441a6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Source Files">
|
||||
<UniqueIdentifier>{205fd53a-8f6d-43fc-9cbc-a515103cceab}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7356f94b-bbd2-420b-82bb-531102b60423}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth">
|
||||
<UniqueIdentifier>{716a737b-4d0a-4cca-80e1-1fe840cf7024}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{60fe25d9-e477-480c-8482-53d4e5dc741e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Header Files">
|
||||
<UniqueIdentifier>{aaf8c364-18ba-44e2-a505-277d026c6cb2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{836ab19d-2c5c-4a5a-b12a-345b5be436ca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Source Files">
|
||||
<UniqueIdentifier>{80ea117a-55f1-482e-898a-aae547fe7052}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ad8b86e3-5082-48ee-997e-c324ab280ab2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP">
|
||||
<UniqueIdentifier>{2c91a081-22d1-488b-a95d-1679abf51bb0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{62b25f88-b27d-4512-aab3-a751400e70d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Source Files">
|
||||
<UniqueIdentifier>{ba630b21-48b6-43d2-a754-91edddd56cc6}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{240bfb70-e011-4cb4-a0cc-84d54c20e4a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Header Files">
|
||||
<UniqueIdentifier>{6b80eeab-e573-445f-ae9c-5c3825660733}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9cfe2823-6f90-4154-9e97-9bf7495b2479}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -306,9 +306,15 @@
|
||||
<ClInclude Include="src\ReactorTestSuite.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketConnectorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketReactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketProactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MailMessageTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -503,9 +509,15 @@
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketConnectorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketProactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessageTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
+1020
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,576 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="NetCore">
|
||||
<UniqueIdentifier>{bb5f99a4-076d-40f6-bd03-b605e2f78942}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Header Files">
|
||||
<UniqueIdentifier>{370ee1f9-94d6-46c9-9cfd-ae9a82e4215e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Source Files">
|
||||
<UniqueIdentifier>{659db2c3-80b4-4646-9df5-9ea4def9cb97}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{135d073c-c9d2-46f3-9f18-8692661c6a80}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{4cea6005-eb6b-4067-8254-b2c023c162b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{3718fde6-4856-4136-8951-ec466b8db23d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{ef1aacf2-69b0-4f45-a2fa-d6273e7de591}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{4379c133-cd56-4860-9c0e-1c3169ab30ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets">
|
||||
<UniqueIdentifier>{c913a0b8-78bf-41ad-bded-a1f9a8b37902}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Header Files">
|
||||
<UniqueIdentifier>{057f1290-2c76-46e8-8dfc-da11d02253ef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Source Files">
|
||||
<UniqueIdentifier>{5a50683c-8e6a-400b-a50f-9eb7b74a6b12}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages">
|
||||
<UniqueIdentifier>{32ed4d09-4da4-4316-8211-0dabc2ecba44}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Header Files">
|
||||
<UniqueIdentifier>{a9b5b4c6-2436-46aa-bc18-79d150dc29c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Source Files">
|
||||
<UniqueIdentifier>{ca0b80f5-478b-497c-bf9e-7bb0d3b0eb62}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP">
|
||||
<UniqueIdentifier>{7f42dbcb-7c13-42ff-9f99-d4ce0d333515}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Header Files">
|
||||
<UniqueIdentifier>{a8ace8af-b953-4ee5-9e7a-3cd7a54a78c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Source Files">
|
||||
<UniqueIdentifier>{ea6141c5-7525-4a5b-b339-cd124ed4f22b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer">
|
||||
<UniqueIdentifier>{53842cf1-f516-431d-8eb5-e82dd686a69a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Header Files">
|
||||
<UniqueIdentifier>{b416b22f-fbf5-40c0-87db-11757f720182}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Source Files">
|
||||
<UniqueIdentifier>{61beb9b6-7056-4521-84b3-fae105421be5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer">
|
||||
<UniqueIdentifier>{0e63a36b-a325-42da-8557-9be5b90249f9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Header Files">
|
||||
<UniqueIdentifier>{f1394d79-96e4-4eed-bfc4-d20f25b9430b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Source Files">
|
||||
<UniqueIdentifier>{ddabcfb2-56ba-49be-adb7-af8fb9d3ef97}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML">
|
||||
<UniqueIdentifier>{021d4d11-8236-4574-a893-53d52a246d4f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Header Files">
|
||||
<UniqueIdentifier>{3ce8c86d-1258-488f-84be-7e95b3e0a540}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Source Files">
|
||||
<UniqueIdentifier>{10ac33f6-f9c0-4caa-8bf4-e0d27328842d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient">
|
||||
<UniqueIdentifier>{244449a7-8c64-48e7-9112-209ef80e7cc3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Header Files">
|
||||
<UniqueIdentifier>{39201469-efa7-45cc-89d4-41e6126221e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Source Files">
|
||||
<UniqueIdentifier>{1f58cb9c-30a1-4dff-813a-c315c41e1540}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient">
|
||||
<UniqueIdentifier>{dbc10ea1-5b42-469b-9358-ff12f39d8682}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Header Files">
|
||||
<UniqueIdentifier>{2f616086-6096-4c84-9622-6fffc25be1e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Source Files">
|
||||
<UniqueIdentifier>{f9cd5b41-fc85-4e81-a08b-69f11f9aa058}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor">
|
||||
<UniqueIdentifier>{0a43d4b7-1310-420d-9d69-b1deb7e0be39}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Header Files">
|
||||
<UniqueIdentifier>{aa486584-1762-4de5-abc4-0bca8749ef07}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Source Files">
|
||||
<UniqueIdentifier>{800eea8c-e13c-40aa-a581-b3af74ef6a74}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail">
|
||||
<UniqueIdentifier>{897be9b0-379b-4005-b6ec-c633df4aa0a6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Header Files">
|
||||
<UniqueIdentifier>{5326e350-6c82-4b47-b8bb-acf10c40f9a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Source Files">
|
||||
<UniqueIdentifier>{f2edd76d-ba16-4ee2-a68b-7d9e9f800879}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP">
|
||||
<UniqueIdentifier>{db1a8466-0305-4faa-9fe6-20fa535c1d80}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Header Files">
|
||||
<UniqueIdentifier>{2d22c5e1-721b-4d19-b698-8773ddc4dabc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Source Files">
|
||||
<UniqueIdentifier>{0bbba14e-6a39-455c-aec1-15af68b3bc73}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP">
|
||||
<UniqueIdentifier>{c92f3301-00f6-4491-beba-14937b1f3e68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Header Files">
|
||||
<UniqueIdentifier>{f6af5476-f273-4302-9e9b-5b6d0d1cbfb2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NTP\Source Files">
|
||||
<UniqueIdentifier>{804c7c07-44a1-4d61-be02-c6cc8b279420}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging">
|
||||
<UniqueIdentifier>{b8618dd9-3ad3-4ace-94e8-a74c69d9d2e7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Header Files">
|
||||
<UniqueIdentifier>{5696d5bc-86ff-43a9-b49c-9f9d45940500}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Source Files">
|
||||
<UniqueIdentifier>{08a48a0b-85b2-43c9-b359-f08ae91631d5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket">
|
||||
<UniqueIdentifier>{c5cf5e44-9907-4ecd-9fcd-075c862a0282}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Header Files">
|
||||
<UniqueIdentifier>{ebe4a4ae-edae-4c4f-9f4c-c05da0288028}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Source Files">
|
||||
<UniqueIdentifier>{57c8332e-5bc0-464a-ba23-717a5ad8d7e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth">
|
||||
<UniqueIdentifier>{d8b00c86-03af-40df-8e84-2ba586a9e97c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Header Files">
|
||||
<UniqueIdentifier>{0ed1b87d-86e0-4883-9889-f8ca060cb9ad}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="OAuth\Source Files">
|
||||
<UniqueIdentifier>{f3304f4b-f410-46d9-879d-66f81e13e1cc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP">
|
||||
<UniqueIdentifier>{fa35d4ea-24c8-4d08-a14d-d92fd1cb7d9f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Source Files">
|
||||
<UniqueIdentifier>{494ab2d2-7191-46ce-adfa-12fe16cd45e6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="UDP\Header Files">
|
||||
<UniqueIdentifier>{3cb06642-ffbd-4684-b1f0-cfe3f3ad4bff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\DNSTest.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\IPAddressTest.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NetCoreTestSuite.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NetworkInterfaceTest.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketAddressTest.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NetTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\DatagramSocketTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\DialogServer.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\DialogSocketTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\EchoServer.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MulticastEchoServer.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MulticastSocketTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\PollSetTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\RawSocketTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketsTestSuite.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketStreamTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketTest.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\UDPEchoServer.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MediaTypeTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MessageHeaderTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MessagesTestSuite.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MultipartReaderTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MultipartWriterTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NameValueCollectionTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\QuotedPrintableTest.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPCookieTest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPCredentialsTest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPRequestTest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPResponseTest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPTestServer.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPTestSuite.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NTLMCredentialsTest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\TCPServerTest.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\TCPServerTestSuite.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPServerTest.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPServerTestSuite.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTMLFormTest.h">
|
||||
<Filter>HTML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTMLTestSuite.h">
|
||||
<Filter>HTML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPClientSessionTest.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPClientTestSuite.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\HTTPStreamFactoryTest.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\FTPClientSessionTest.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\FTPClientTestSuite.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\FTPStreamFactoryTest.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ReactorTestSuite.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketConnectorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketReactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SocketProactorTest.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MailMessageTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MailStreamTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\MailTestSuite.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\POP3ClientSessionTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SMTPClientSessionTest.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ICMPClientTest.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ICMPClientTestSuite.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ICMPSocketTest.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NTPClientTest.h">
|
||||
<Filter>NTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\NTPClientTestSuite.h">
|
||||
<Filter>NTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SyslogTest.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\WebSocketTest.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\WebSocketTestSuite.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\OAuth10CredentialsTest.h">
|
||||
<Filter>OAuth\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\OAuth20CredentialsTest.h">
|
||||
<Filter>OAuth\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\OAuthTestSuite.h">
|
||||
<Filter>OAuth\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\UDPServerTest.h">
|
||||
<Filter>UDP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\UDPServerTestSuite.h">
|
||||
<Filter>UDP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DNSTest.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IPAddressTest.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetCoreTestSuite.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetworkInterfaceTest.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketAddressTest.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocketTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogServer.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogSocketTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EchoServer.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastEchoServer.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastSocketTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PollSetTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocketTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketsTestSuite.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketStreamTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketTest.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPEchoServer.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MediaTypeTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessageHeaderTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessagesTestSuite.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartReaderTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartWriterTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NameValueCollectionTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableTest.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCookieTest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCredentialsTest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestTest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPResponseTest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestServer.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPTestSuite.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTLMCredentialsTest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTest.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerTestSuite.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTest.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerTestSuite.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLFormTest.cpp">
|
||||
<Filter>HTML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLTestSuite.cpp">
|
||||
<Filter>HTML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientSessionTest.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientTestSuite.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStreamFactoryTest.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientSessionTest.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientTestSuite.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPStreamFactoryTest.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ReactorTestSuite.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketConnectorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketProactorTest.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessageTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailStreamTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailTestSuite.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\POP3ClientSessionTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SMTPClientSessionTest.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTest.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClientTestSuite.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocketTest.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTest.cpp">
|
||||
<Filter>NTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NTPClientTestSuite.cpp">
|
||||
<Filter>NTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SyslogTest.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTest.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketTestSuite.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth10CredentialsTest.cpp">
|
||||
<Filter>OAuth\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuth20CredentialsTest.cpp">
|
||||
<Filter>OAuth\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\OAuthTestSuite.cpp">
|
||||
<Filter>OAuth\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTest.cpp">
|
||||
<Filter>UDP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\UDPServerTestSuite.cpp">
|
||||
<Filter>UDP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+17
-1
@@ -1050,10 +1050,18 @@
|
||||
RelativePath=".\src\ReactorTestSuite.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketConnectorTest.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactorTest.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketProactorTest.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
@@ -1062,10 +1070,18 @@
|
||||
RelativePath=".\src\ReactorTestSuite.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketConnectorTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactorTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SocketProactorTest.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
@@ -1299,4 +1315,4 @@
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
</VisualStudioProject>
|
||||
+4
-4
@@ -104,11 +104,11 @@ void DNSTest::testResolve()
|
||||
|
||||
void DNSTest::testEncodeIDN()
|
||||
{
|
||||
std::string idn("d\xc3\xb6m\xc3\xa4in.example"); // d"om"ain.example
|
||||
std::string idn("d\xc3\xb6m\xc3\xa4in.example"); // d"om"ain.example
|
||||
assertTrue (DNS::isIDN(idn));
|
||||
assertTrue (DNS::encodeIDN(idn) == "xn--dmin-moa0i.example");
|
||||
|
||||
idn = ".d\xc3\xb6m\xc3\xa4in.example"; // .d"om"ain.example
|
||||
idn = ".d\xc3\xb6m\xc3\xa4in.example"; // .d"om"ain.example
|
||||
assertTrue (DNS::isIDN(idn));
|
||||
assertTrue (DNS::encodeIDN(idn) == ".xn--dmin-moa0i.example");
|
||||
|
||||
@@ -154,11 +154,11 @@ void DNSTest::testDecodeIDN()
|
||||
{
|
||||
std::string enc("xn--dmin-moa0i.example");
|
||||
assertTrue (DNS::isEncodedIDN(enc));
|
||||
assertTrue (DNS::decodeIDN(enc) == "d\xc3\xb6m\xc3\xa4in.example"); // d"om"ain.example
|
||||
assertTrue (DNS::decodeIDN(enc) == "d\xc3\xb6m\xc3\xa4in.example"); // d"om"ain.example
|
||||
|
||||
enc = ".xn--dmin-moa0i.example";
|
||||
assertTrue (DNS::isEncodedIDN(enc));
|
||||
assertTrue (DNS::decodeIDN(enc) == ".d\xc3\xb6m\xc3\xa4in.example"); // .d"om"ain.example
|
||||
assertTrue (DNS::decodeIDN(enc) == ".d\xc3\xb6m\xc3\xa4in.example"); // .d"om"ain.example
|
||||
|
||||
enc = "xn--dmin-moa0i.example.";
|
||||
assertTrue (DNS::isEncodedIDN(enc));
|
||||
|
||||
+217
-1
@@ -13,12 +13,12 @@
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "UDPEchoServer.h"
|
||||
#include "Poco/Net/DatagramSocket.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Net/NetworkInterface.h"
|
||||
#include "Poco/Net/NetException.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
#include "Poco/Thread.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ using Poco::Stopwatch;
|
||||
using Poco::TimeoutException;
|
||||
using Poco::InvalidArgumentException;
|
||||
using Poco::IOException;
|
||||
using Poco::Thread;
|
||||
|
||||
|
||||
DatagramSocketTest::DatagramSocketTest(const std::string& name): CppUnit::TestCase(name)
|
||||
@@ -62,6 +63,46 @@ void DatagramSocketTest::testEcho()
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testMoveDatagramSocket()
|
||||
{
|
||||
UDPEchoServer echoServer;
|
||||
DatagramSocket ss0 = DatagramSocket();
|
||||
char buffer[256];
|
||||
ss0.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
DatagramSocket ss(std::move(ss0));
|
||||
#if POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue (ss0.isNull());
|
||||
#else
|
||||
assertFalse (ss0.isNull());
|
||||
#endif
|
||||
int n = ss.sendBytes("hello", 5);
|
||||
assertTrue (n == 5);
|
||||
n = ss.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
|
||||
std::memset(buffer, 0, sizeof(buffer));
|
||||
ss0 = ss;
|
||||
assertTrue (ss0.impl());
|
||||
assertTrue (ss.impl());
|
||||
assertTrue (ss0.impl() == ss.impl());
|
||||
ss = std::move(ss0);
|
||||
#if POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue (ss0.isNull());
|
||||
#else
|
||||
assertFalse (ss0.isNull());
|
||||
#endif
|
||||
assertTrue (ss.impl());
|
||||
n = ss.sendBytes("hello", 5);
|
||||
assertTrue (n == 5);
|
||||
n = ss.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
ss.close();
|
||||
ss0.close();
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testEchoBuffer()
|
||||
{
|
||||
UDPEchoServer echoServer;
|
||||
@@ -81,6 +122,25 @@ void DatagramSocketTest::testEchoBuffer()
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testReceiveFromAvailable()
|
||||
{
|
||||
UDPEchoServer echoServer(SocketAddress("127.0.0.1", 0));
|
||||
DatagramSocket ss(SocketAddress::IPv4);
|
||||
int n = ss.sendTo("hello", 5, SocketAddress("127.0.0.1", echoServer.port()));
|
||||
assertTrue (n == 5);
|
||||
Thread::sleep(100);
|
||||
char buffer[256];
|
||||
SocketAddress sa;
|
||||
assertTrue (ss.available() == 5);
|
||||
n = ss.receiveFrom(buffer, sizeof(buffer), sa);
|
||||
assertTrue (sa.host() == echoServer.address().host());
|
||||
assertTrue (sa.port() == echoServer.port());
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
ss.close();
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testSendToReceiveFrom()
|
||||
{
|
||||
UDPEchoServer echoServer(SocketAddress("127.0.0.1", 0));
|
||||
@@ -113,6 +173,158 @@ void DatagramSocketTest::testUnbound()
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt16 DatagramSocketTest::getFreePort(SocketAddress::Family family, Poco::UInt16 port)
|
||||
{
|
||||
bool failed = false;
|
||||
poco_assert_dbg(port > 0);
|
||||
--port;
|
||||
DatagramSocket sock(family);
|
||||
do
|
||||
{
|
||||
failed = false;
|
||||
SocketAddress sa(family, ++port);
|
||||
try
|
||||
{
|
||||
sock.bind(sa, false);
|
||||
}
|
||||
catch (Poco::Net::NetException&)
|
||||
{
|
||||
failed = true;
|
||||
}
|
||||
} while (failed && sock.getError() == POCO_EADDRINUSE);
|
||||
return port;
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testReuseAddressPortWildcard()
|
||||
{
|
||||
Poco::UInt16 port = getFreePort(SocketAddress::IPv4, 1234);
|
||||
Poco::UInt16 port6 = getFreePort(SocketAddress::IPv6, 1234);
|
||||
assertTrue(port >= 1234);
|
||||
assertTrue(port6 >= 1234);
|
||||
|
||||
// reuse
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv4);
|
||||
ds1.bind(SocketAddress(port), true);
|
||||
assertTrue(ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
ds2.bind(SocketAddress(port), true);
|
||||
assertTrue(ds2.getReuseAddress());
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
DatagramSocket ds3(SocketAddress::IPv6);
|
||||
ds3.bind6(SocketAddress(SocketAddress::IPv6, port6), true, true, false);
|
||||
assertTrue(ds3.getReuseAddress());
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv6);
|
||||
ds1.bind6(SocketAddress(SocketAddress::IPv6, port6), true, true, false);
|
||||
assertTrue(ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
ds2.bind6(SocketAddress(SocketAddress::IPv6, port6), true, true, false);
|
||||
assertTrue(ds2.getReuseAddress());
|
||||
DatagramSocket ds3;
|
||||
ds3.bind(SocketAddress(port), true, true);
|
||||
assertTrue(ds3.getReuseAddress());
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv6);
|
||||
ds1.bind6(SocketAddress(SocketAddress::IPv6, port), true, true, true);
|
||||
assertTrue(ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
ds2.bind6(SocketAddress(SocketAddress::IPv6, port), true, true, true);
|
||||
assertTrue(ds2.getReuseAddress());
|
||||
}
|
||||
#endif
|
||||
|
||||
// not reuse
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv4);
|
||||
ds1.bind(SocketAddress(port), false);
|
||||
assertTrue(!ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
try
|
||||
{
|
||||
ds2.bind(SocketAddress(port), false);
|
||||
fail("binding to non-reuse address must throw");
|
||||
}
|
||||
catch (Poco::IOException&) {}
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv6);
|
||||
ds1.bind6(SocketAddress(SocketAddress::IPv6, port), false, false, true);
|
||||
assertTrue(!ds1.getReuseAddress());
|
||||
DatagramSocket ds2(SocketAddress::IPv6);
|
||||
try
|
||||
{
|
||||
ds2.bind6(SocketAddress(SocketAddress::IPv6, port), false, false, true);
|
||||
fail("binding to non-reuse address must throw");
|
||||
}
|
||||
catch (Poco::IOException&) {}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testReuseAddressPortSpecific()
|
||||
{
|
||||
Poco::UInt16 port = getFreePort(SocketAddress::IPv4, 1234);
|
||||
assertTrue(port >= 1234);
|
||||
|
||||
// reuse
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv4);
|
||||
ds1.bind(SocketAddress(port), true);
|
||||
assertTrue(ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
ds2.bind(SocketAddress("127.0.0.1", port), true);
|
||||
assertTrue(ds2.getReuseAddress());
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
DatagramSocket ds3(SocketAddress::IPv6);
|
||||
ds3.bind6(SocketAddress("::1", port), true, true, false);
|
||||
assertTrue(ds3.getReuseAddress());
|
||||
#endif
|
||||
}
|
||||
|
||||
// not reuse
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv4);
|
||||
ds1.bind(SocketAddress("0.0.0.0", port), false);
|
||||
assertTrue(!ds1.getReuseAddress());
|
||||
DatagramSocket ds2;
|
||||
try
|
||||
{
|
||||
ds2.bind(SocketAddress("127.0.0.1", port), false);
|
||||
fail("binding to non-reuse IPv4 address must throw");
|
||||
}
|
||||
catch (Poco::IOException&) {}
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
{
|
||||
DatagramSocket ds1(SocketAddress::IPv6);
|
||||
ds1.bind6(SocketAddress("::", port), false, false, true);
|
||||
assertTrue(!ds1.getReuseAddress());
|
||||
DatagramSocket ds2(SocketAddress::IPv6);
|
||||
try
|
||||
{
|
||||
ds2.bind6(SocketAddress("::1", port), false, false, true);
|
||||
fail("binding to non-reuse IPv6 address must throw");
|
||||
}
|
||||
catch (Poco::IOException&) {}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DatagramSocketTest::testBroadcast()
|
||||
{
|
||||
UDPEchoServer echoServer;
|
||||
@@ -607,9 +819,13 @@ CppUnit::Test* DatagramSocketTest::suite()
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DatagramSocketTest");
|
||||
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testEcho);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testMoveDatagramSocket);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testEchoBuffer);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testReceiveFromAvailable);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testSendToReceiveFrom);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testUnbound);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testReuseAddressPortWildcard);
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testReuseAddressPortSpecific);
|
||||
#if (POCO_OS != POCO_OS_FREE_BSD) // works only with local net bcast and very randomly
|
||||
CppUnit_addTest(pSuite, DatagramSocketTest, testBroadcast);
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
|
||||
|
||||
@@ -25,9 +26,13 @@ public:
|
||||
~DatagramSocketTest();
|
||||
|
||||
void testEcho();
|
||||
void testMoveDatagramSocket();
|
||||
void testEchoBuffer();
|
||||
void testReceiveFromAvailable();
|
||||
void testSendToReceiveFrom();
|
||||
void testUnbound();
|
||||
void testReuseAddressPortWildcard();
|
||||
void testReuseAddressPortSpecific();
|
||||
void testBroadcast();
|
||||
void testGatherScatterFixed();
|
||||
void testGatherScatterVariable();
|
||||
@@ -38,6 +43,8 @@ public:
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
static Poco::UInt16 getFreePort(Poco::Net::SocketAddress::Family family, std::uint16_t port);
|
||||
|
||||
// "STRF" are sendto/recvfrom versions of the same functionality
|
||||
void testGatherScatterFixedWin();
|
||||
void testGatherScatterSTRFFixedWin();
|
||||
|
||||
+4
-4
@@ -97,7 +97,7 @@ void DialogServer::run()
|
||||
const std::string& DialogServer::lastCommand() const
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
|
||||
static const std::string EMPTY;
|
||||
if (_lastCommands.empty())
|
||||
return EMPTY;
|
||||
@@ -145,7 +145,7 @@ void DialogServer::addResponse(const std::string& response)
|
||||
_nextResponses.push_back(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DialogServer::clearCommands()
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
@@ -153,11 +153,11 @@ void DialogServer::clearCommands()
|
||||
_lastCommands.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DialogServer::clearResponses()
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
|
||||
_nextResponses.clear();
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -36,10 +36,10 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
|
||||
const std::string& lastCommand() const;
|
||||
/// Returns the last command received by the server.
|
||||
|
||||
@@ -52,29 +52,29 @@ public:
|
||||
|
||||
const std::vector<std::string>& lastCommands() const;
|
||||
/// Returns the last command received by the server.
|
||||
|
||||
|
||||
void addResponse(const std::string& response);
|
||||
/// Sets the next response returned by the server.
|
||||
|
||||
|
||||
void clearCommands();
|
||||
/// Clears all commands.
|
||||
|
||||
|
||||
void clearResponses();
|
||||
/// Clears all responses.
|
||||
|
||||
|
||||
void log(bool flag);
|
||||
/// Enables or disables logging to stdout.
|
||||
|
||||
|
||||
private:
|
||||
Poco::Net::ServerSocket _socket;
|
||||
Poco::Thread _thread;
|
||||
Poco::Event _ready;
|
||||
mutable Poco::FastMutex _mutex;
|
||||
bool _stop;
|
||||
std::atomic<bool> _stop;
|
||||
std::vector<std::string> _nextResponses;
|
||||
std::vector<std::string> _lastCommands;
|
||||
bool _acceptCommands;
|
||||
bool _log;
|
||||
std::atomic<bool> _acceptCommands;
|
||||
std::atomic<bool> _log;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -45,11 +45,11 @@ void DialogSocketTest::testDialogSocket()
|
||||
ds.sendString("Hello, World!\n");
|
||||
ds.receiveMessage(str);
|
||||
assertTrue (str == "Hello, World!");
|
||||
|
||||
|
||||
ds.sendMessage("EHLO", "appinf.com");
|
||||
ds.receiveMessage(str);
|
||||
assertTrue (str == "EHLO appinf.com");
|
||||
|
||||
|
||||
ds.sendMessage("PUT", "local.txt", "remote.txt");
|
||||
ds.receiveMessage(str);
|
||||
assertTrue (str == "PUT local.txt remote.txt");
|
||||
@@ -58,12 +58,12 @@ void DialogSocketTest::testDialogSocket()
|
||||
int status = ds.receiveStatusMessage(str);
|
||||
assertTrue (status == 220);
|
||||
assertTrue (str == "220 Hello, world!");
|
||||
|
||||
|
||||
ds.sendString("220-line1\r\n220 line2\r\n");
|
||||
status = ds.receiveStatusMessage(str);
|
||||
assertTrue (status == 220);
|
||||
assertTrue (str == "220-line1\n220 line2");
|
||||
|
||||
|
||||
ds.sendString("220-line1\r\nline2\r\n220 line3\r\n");
|
||||
status = ds.receiveStatusMessage(str);
|
||||
assertTrue (status == 220);
|
||||
@@ -73,7 +73,7 @@ void DialogSocketTest::testDialogSocket()
|
||||
status = ds.receiveStatusMessage(str);
|
||||
assertTrue (status == 0);
|
||||
assertTrue (str == "Hello, world!");
|
||||
|
||||
|
||||
ds.sendString("Header\nMore Bytes");
|
||||
status = ds.receiveStatusMessage(str);
|
||||
assertTrue (status == 0);
|
||||
|
||||
+3
-2
@@ -18,6 +18,7 @@
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Thread.h"
|
||||
#include "Poco/Event.h"
|
||||
#include <atomic>
|
||||
|
||||
|
||||
class EchoServer: public Poco::Runnable
|
||||
@@ -50,8 +51,8 @@ private:
|
||||
Poco::Net::ServerSocket _socket;
|
||||
Poco::Thread _thread;
|
||||
Poco::Event _ready;
|
||||
bool _stop;
|
||||
bool _done;
|
||||
std::atomic<bool> _stop;
|
||||
std::atomic<bool> _done;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+28
-28
@@ -42,9 +42,9 @@ namespace
|
||||
_session(session)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ActiveMethod<std::string, std::string, ActiveDownloader> download;
|
||||
|
||||
|
||||
protected:
|
||||
std::string downloadImp(const std::string& path)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ namespace
|
||||
_session.endDownload();
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
FTPClientSession& _session;
|
||||
};
|
||||
@@ -83,7 +83,7 @@ void FTPClientSessionTest::login(DialogServer& server, FTPClientSession& session
|
||||
assertTrue (cmd == "PASS password");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "TYPE I");
|
||||
|
||||
|
||||
assertTrue (session.getFileType() == FTPClientSession::TYPE_BINARY);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ void FTPClientSessionTest::testLoginFailed1()
|
||||
catch (FTPException&)
|
||||
{
|
||||
}
|
||||
server.addResponse("221 Good Bye");
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ void FTPClientSessionTest::testCommands()
|
||||
assertTrue (cmd == "PASS password");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "TYPE I");
|
||||
|
||||
|
||||
// systemType
|
||||
server.clearCommands();
|
||||
server.addResponse("215 UNIX Type: L8 Version: dummyFTP 1.0");
|
||||
@@ -227,7 +227,7 @@ void FTPClientSessionTest::testCommands()
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "SYST");
|
||||
assertTrue (type == "UNIX Type: L8 Version: dummyFTP 1.0");
|
||||
|
||||
|
||||
// getWorkingDirectory
|
||||
server.addResponse("257 \"/usr/test\" is current directory");
|
||||
std::string cwd = session.getWorkingDirectory();
|
||||
@@ -241,18 +241,18 @@ void FTPClientSessionTest::testCommands()
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "PWD");
|
||||
assertTrue (cwd == "\"quote\"");
|
||||
|
||||
|
||||
// setWorkingDirectory
|
||||
server.addResponse("250 CWD OK");
|
||||
session.setWorkingDirectory("test");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "CWD test");
|
||||
|
||||
|
||||
server.addResponse("250 CDUP OK");
|
||||
session.cdup();
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "CDUP");
|
||||
|
||||
|
||||
// rename
|
||||
server.addResponse("350 File exists, send destination name");
|
||||
server.addResponse("250 Rename OK");
|
||||
@@ -261,7 +261,7 @@ void FTPClientSessionTest::testCommands()
|
||||
assertTrue (cmd == "RNFR old.txt");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "RNTO new.txt");
|
||||
|
||||
|
||||
// rename (failing)
|
||||
server.addResponse("550 not found");
|
||||
try
|
||||
@@ -273,7 +273,7 @@ void FTPClientSessionTest::testCommands()
|
||||
{
|
||||
}
|
||||
server.clearCommands();
|
||||
|
||||
|
||||
// remove
|
||||
server.addResponse("250 delete ok");
|
||||
session.remove("test.txt");
|
||||
@@ -327,7 +327,7 @@ void FTPClientSessionTest::testCommands()
|
||||
{
|
||||
}
|
||||
server.clearCommands();
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
@@ -344,17 +344,17 @@ void FTPClientSessionTest::testDownloadPORT()
|
||||
session.setPassive(false);
|
||||
session.login("user", "password");
|
||||
server.clearCommands();
|
||||
|
||||
|
||||
server.addResponse("500 EPRT not understood");
|
||||
server.addResponse("200 PORT OK");
|
||||
server.addResponse("150 Sending data\r\n226 Transfer complete");
|
||||
|
||||
ActiveDownloader dl(session);
|
||||
ActiveResult<std::string> result = dl.download("test.txt");
|
||||
|
||||
|
||||
std::string cmd = server.popCommandWait();
|
||||
assertTrue (cmd.substr(0, 4) == "EPRT");
|
||||
|
||||
|
||||
cmd = server.popCommandWait();
|
||||
assertTrue (cmd.substr(0, 4) == "PORT");
|
||||
|
||||
@@ -382,7 +382,7 @@ void FTPClientSessionTest::testDownloadPORT()
|
||||
result.wait();
|
||||
std::string received = result.data();
|
||||
assertTrue (received == data);
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
@@ -399,26 +399,26 @@ void FTPClientSessionTest::testDownloadEPRT()
|
||||
session.setPassive(false);
|
||||
session.login("user", "password");
|
||||
server.clearCommands();
|
||||
|
||||
|
||||
server.addResponse("200 EPRT OK");
|
||||
server.addResponse("150 Sending data\r\n226 Transfer complete");
|
||||
|
||||
ActiveDownloader dl(session);
|
||||
ActiveResult<std::string> result = dl.download("test.txt");
|
||||
|
||||
|
||||
std::string cmd = server.popCommandWait();
|
||||
assertTrue (cmd.substr(0, 4) == "EPRT");
|
||||
|
||||
|
||||
std::string dummy;
|
||||
char c;
|
||||
int d;
|
||||
int port;
|
||||
std::istringstream istr(cmd);
|
||||
istr >> dummy >> c >> d >> c >> d >> c >> d >> c >> d >> c >> d >> c >> port >> c;
|
||||
|
||||
|
||||
cmd = server.popCommandWait();
|
||||
assertTrue (cmd == "RETR test.txt");
|
||||
|
||||
|
||||
SocketAddress sa("127.0.0.1", (Poco::UInt16) port);
|
||||
DialogSocket dataSock;
|
||||
dataSock.connect(sa);
|
||||
@@ -430,7 +430,7 @@ void FTPClientSessionTest::testDownloadEPRT()
|
||||
result.wait();
|
||||
std::string received = result.data();
|
||||
assertTrue (received == data);
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
@@ -463,7 +463,7 @@ void FTPClientSessionTest::testDownloadPASV()
|
||||
session.endDownload();
|
||||
std::string s(dataStr.str());
|
||||
assertTrue (s == "This is some data\r\n");
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
@@ -493,12 +493,12 @@ void FTPClientSessionTest::testDownloadEPSV()
|
||||
session.endDownload();
|
||||
std::string s(dataStr.str());
|
||||
assertTrue (s == "This is some data\r\n");
|
||||
|
||||
|
||||
std::string cmd = server.popCommand();
|
||||
assertTrue (cmd.substr(0, 4) == "EPSV");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "RETR test.txt");
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
@@ -561,12 +561,12 @@ void FTPClientSessionTest::testList()
|
||||
session.endList();
|
||||
std::string s(dataStr.str());
|
||||
assertTrue (s == "file1\r\nfile2\r\n");
|
||||
|
||||
|
||||
std::string cmd = server.popCommand();
|
||||
assertTrue (cmd.substr(0, 4) == "EPSV");
|
||||
cmd = server.popCommand();
|
||||
assertTrue (cmd == "NLST");
|
||||
|
||||
|
||||
server.addResponse("221 Good Bye");
|
||||
session.close();
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public:
|
||||
void testDownloadEPSV();
|
||||
void testUpload();
|
||||
void testList();
|
||||
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
||||
+26
-6
@@ -206,7 +206,7 @@ void HTTPClientSessionTest::testKeepAlive()
|
||||
assertTrue (response.getKeepAlive());
|
||||
std::ostringstream ostr1;
|
||||
assertTrue (StreamCopier::copyStream(rs1, ostr1) == 0);
|
||||
|
||||
|
||||
request.setMethod(HTTPRequest::HTTP_GET);
|
||||
request.setURI("/small");
|
||||
s.sendRequest(request);
|
||||
@@ -216,7 +216,7 @@ void HTTPClientSessionTest::testKeepAlive()
|
||||
std::ostringstream ostr2;
|
||||
StreamCopier::copyStream(rs2, ostr2);
|
||||
assertTrue (ostr2.str() == HTTPTestServer::SMALL_BODY);
|
||||
|
||||
|
||||
request.setMethod(HTTPRequest::HTTP_GET);
|
||||
request.setURI("/large");
|
||||
s.sendRequest(request);
|
||||
@@ -240,6 +240,25 @@ void HTTPClientSessionTest::testKeepAlive()
|
||||
}
|
||||
|
||||
|
||||
void HTTPClientSessionTest::testTrailer()
|
||||
{
|
||||
HTTPTestServer srv;
|
||||
HTTPClientSession s("127.0.0.1", srv.port());
|
||||
s.setKeepAlive(true);
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/trailer", HTTPMessage::HTTP_1_1);
|
||||
s.sendRequest(request);
|
||||
HTTPResponse response;
|
||||
std::istream& rs = s.receiveResponse(response);
|
||||
assertTrue (response.getContentType() == "text/plain");
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(rs, ostr);
|
||||
assertTrue (ostr.str() == HTTPTestServer::LARGE_BODY);
|
||||
assertTrue (!s.responseTrailer().empty());
|
||||
assertTrue (s.responseTrailer().get("Trailer-1") == "Value 1");
|
||||
assertTrue (s.responseTrailer().get("Trailer-2") == "Value 2");
|
||||
}
|
||||
|
||||
|
||||
void HTTPClientSessionTest::testProxy()
|
||||
{
|
||||
HTTPTestServer srv;
|
||||
@@ -273,7 +292,7 @@ void HTTPClientSessionTest::testProxyAuth()
|
||||
StreamCopier::copyStream(rs, ostr);
|
||||
assertTrue (ostr.str() == HTTPTestServer::LARGE_BODY);
|
||||
std::string r = srv.lastRequest();
|
||||
assertTrue (r.find("Proxy-Authorization: Basic dXNlcjpwYXNz\r\n") != std::string::npos);
|
||||
assertTrue (r.find("Proxy-Authorization: Basic dXNlcjpwYXNz\r\n") != std::string::npos);
|
||||
}
|
||||
|
||||
|
||||
@@ -283,15 +302,15 @@ void HTTPClientSessionTest::testBypassProxy()
|
||||
proxyConfig.host = "proxy.domain.com";
|
||||
proxyConfig.port = 80;
|
||||
proxyConfig.nonProxyHosts = "localhost|127\\.0\\.0\\.1";
|
||||
|
||||
|
||||
HTTPClientSession s1("127.0.0.1", 80);
|
||||
s1.setProxyConfig(proxyConfig);
|
||||
assertTrue (s1.bypassProxy());
|
||||
|
||||
|
||||
HTTPClientSession s2("127.0.0.1", 80);
|
||||
s2.setProxyConfig(proxyConfig);
|
||||
assertTrue (s2.bypassProxy());
|
||||
|
||||
|
||||
HTTPClientSession s3("www.appinf.com", 80);
|
||||
s3.setProxyConfig(proxyConfig);
|
||||
assertTrue (!s3.bypassProxy());
|
||||
@@ -363,6 +382,7 @@ CppUnit::Test* HTTPClientSessionTest::suite()
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testPostSmallClose);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testPostLargeClose);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testKeepAlive);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testTrailer);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testProxy);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testProxyAuth);
|
||||
CppUnit_addTest(pSuite, HTTPClientSessionTest, testBypassProxy);
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
void testPostSmallClose();
|
||||
void testPostLargeClose();
|
||||
void testKeepAlive();
|
||||
void testTrailer();
|
||||
void testProxy();
|
||||
void testProxyAuth();
|
||||
void testBypassProxy();
|
||||
|
||||
@@ -214,6 +214,45 @@ void HTTPCredentialsTest::testDigestCredentialsQoP()
|
||||
assertTrue (params.size() == 9);
|
||||
}
|
||||
|
||||
void HTTPCredentialsTest::testDigestCredentialsQoPSHA256()
|
||||
{
|
||||
HTTPDigestCredentials creds("user", "s3cr3t");
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/digest/");
|
||||
HTTPResponse response;
|
||||
response.set("WWW-Authenticate", "Digest realm=\"TestDigest\", nonce=\"212573bb90170538efad012978ab811f%lu\", opaque=\"opaque\", qop=\"auth,auth-int\", algorithm=SHA-256");
|
||||
creds.authenticate(request, response);
|
||||
|
||||
HTTPAuthenticationParams params(request);
|
||||
assertTrue (params["nonce"] == "212573bb90170538efad012978ab811f%lu");
|
||||
assertTrue (params["realm"] == "TestDigest");
|
||||
assertTrue (params["response"] != "40e4889cfbd0e561f71e3107a2863bc4");
|
||||
assertTrue (params["uri"] == "/digest/");
|
||||
assertTrue (params["username"] == "user");
|
||||
assertTrue (params["opaque"] == "opaque");
|
||||
assertTrue (params["cnonce"] != "");
|
||||
assertTrue (params["nc"] == "00000001");
|
||||
assertTrue (params["qop"] == "auth");
|
||||
assertTrue (params["algorithm"] == "SHA-256");
|
||||
assertTrue (params.size() == 10);
|
||||
|
||||
std::string cnonce = params["cnonce"];
|
||||
std::string aresp = params["response"];
|
||||
|
||||
params.clear();
|
||||
|
||||
creds.updateAuthInfo(request);
|
||||
params.fromRequest(request);
|
||||
assertTrue (params["nonce"] == "212573bb90170538efad012978ab811f%lu");
|
||||
assertTrue (params["realm"] == "TestDigest");
|
||||
assertTrue (params["response"] != aresp);
|
||||
assertTrue (params["uri"] == "/digest/");
|
||||
assertTrue (params["username"] == "user");
|
||||
assertTrue (params["opaque"] == "opaque");
|
||||
assertTrue (params["cnonce"] == cnonce);
|
||||
assertTrue (params["nc"] == "00000002");
|
||||
assertTrue (params["qop"] == "auth");
|
||||
assertTrue (params.size() == 10);
|
||||
}
|
||||
|
||||
void HTTPCredentialsTest::testCredentialsBasic()
|
||||
{
|
||||
@@ -311,6 +350,43 @@ void HTTPCredentialsTest::testVerifyAuthInfoQoP()
|
||||
assertTrue (!creds.verifyAuthInfo(request));
|
||||
}
|
||||
|
||||
void HTTPCredentialsTest::testVerifyAuthInfoQoPSHA256() {
|
||||
HTTPDigestCredentials sha256Creds("user", "s3cr3t");
|
||||
HTTPRequest sha256Request(HTTPRequest::HTTP_GET, "/digest/");
|
||||
HTTPResponse sha256Response;
|
||||
sha256Response.set("WWW-Authenticate", "Digest realm=\"TestDigest\", nonce=\"212573bb90170538efad012978ab811f%lu\", opaque=\"opaque\", qop=\"auth,auth-int\", algorithm=SHA-256");
|
||||
sha256Creds.authenticate(sha256Request, sha256Response);
|
||||
assertTrue (sha256Creds.verifyAuthInfo(sha256Request));
|
||||
|
||||
sha256Request.set("Authorization", "Digest cnonce=\"f9c80ffd1c3bc4ee47ed92b704ba75a4\", nc=00000001, nonce=\"212573bb90170538efad012978ab811f%lu\", opaque=\"opaque\", qop=\"auth\", realm=\"TestDigest\", response=\"ff0e90b9aa019120ea0ed6e23ce95d9a\", uri=\"/digest/\", username=\"user\", algorithm=SHA-256");
|
||||
assertTrue (!sha256Creds.verifyAuthInfo(sha256Request));
|
||||
|
||||
HTTPDigestCredentials sha256SessCreds("user", "s3cr3t");
|
||||
HTTPRequest sha256SessRequest(HTTPRequest::HTTP_GET, "/digest/");
|
||||
HTTPResponse sha256SessResponse;
|
||||
sha256SessResponse.set("WWW-Authenticate", "Digest realm=\"TestDigest\", nonce=\"212573bb90170538efad012978ab811f%lu\", opaque=\"opaque\", qop=\"auth,auth-int\", algorithm=SHA-256-sess");
|
||||
sha256SessCreds.authenticate(sha256SessRequest, sha256SessResponse);
|
||||
assertTrue (sha256SessCreds.verifyAuthInfo(sha256SessRequest));
|
||||
|
||||
sha256SessRequest.set("Authorization", "Digest cnonce=\"f9c80ffd1c3bc4ee47ed92b704ba75a4\", nc=00000001, nonce=\"212573bb90170538efad012978ab811f%lu\", opaque=\"opaque\", qop=\"auth\", realm=\"TestDigest\", response=\"ff0e90b9aa019120ea0ed6e23ce95d9a\", uri=\"/digest/\", username=\"user\", algorithm=SHA-256-sess");
|
||||
assertTrue (!sha256SessCreds.verifyAuthInfo(sha256SessRequest));
|
||||
}
|
||||
|
||||
void HTTPCredentialsTest::testIsAlgorithmSupported() {
|
||||
HTTPDigestCredentials sha256Creds("user", "s3cr3t");
|
||||
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("MD5"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("MD5-sess"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-sess"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-256"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-256-sess"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-512-256"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-512-256-sess"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-512"));
|
||||
assertTrue (sha256Creds.isAlgorithmSupported("SHA-512-sess"));
|
||||
assertFalse (sha256Creds.isAlgorithmSupported("random_algorithm"));
|
||||
}
|
||||
|
||||
void HTTPCredentialsTest::setUp()
|
||||
{
|
||||
@@ -333,6 +409,7 @@ CppUnit::Test* HTTPCredentialsTest::suite()
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testAuthenticationParamsMultipleHeaders);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testDigestCredentials);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testDigestCredentialsQoP);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testDigestCredentialsQoPSHA256);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testCredentialsBasic);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testProxyCredentialsBasic);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testCredentialsDigest);
|
||||
@@ -341,6 +418,8 @@ CppUnit::Test* HTTPCredentialsTest::suite()
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testExtractCredentials);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testVerifyAuthInfo);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testVerifyAuthInfoQoP);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testVerifyAuthInfoQoPSHA256);
|
||||
CppUnit_addTest(pSuite, HTTPCredentialsTest, testIsAlgorithmSupported);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
void testAuthenticationParamsMultipleHeaders();
|
||||
void testDigestCredentials();
|
||||
void testDigestCredentialsQoP();
|
||||
void testDigestCredentialsQoPSHA256();
|
||||
void testCredentialsBasic();
|
||||
void testProxyCredentialsBasic();
|
||||
void testCredentialsDigest();
|
||||
@@ -39,6 +40,8 @@ public:
|
||||
void testExtractCredentials();
|
||||
void testVerifyAuthInfo();
|
||||
void testVerifyAuthInfoQoP();
|
||||
void testVerifyAuthInfoQoPSHA256();
|
||||
void testIsAlgorithmSupported();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
+5
-5
@@ -209,22 +209,22 @@ void HTTPRequestTest::testCookies()
|
||||
cookies1.add("cookie1", "value1");
|
||||
request1.setCookies(cookies1);
|
||||
assertTrue (request1["Cookie"] == "cookie1=value1");
|
||||
|
||||
|
||||
HTTPRequest request2;
|
||||
NameValueCollection cookies2;
|
||||
cookies2.add("cookie2", "value2");
|
||||
cookies2.add("cookie3", "value3");
|
||||
request2.setCookies(cookies2);
|
||||
assertTrue (request2["Cookie"] == "cookie2=value2; cookie3=value3");
|
||||
|
||||
|
||||
request1.setCookies(cookies2);
|
||||
NameValueCollection cookies3;
|
||||
request1.getCookies(cookies3);
|
||||
assertTrue (cookies3.size() == 3);
|
||||
assertTrue (cookies3["cookie1"] == "value1");
|
||||
assertTrue (cookies3["cookie2"] == "value2");
|
||||
assertTrue (cookies3["cookie3"] == "value3");
|
||||
|
||||
assertTrue (cookies3["cookie3"] == "value3");
|
||||
|
||||
HTTPRequest request3;
|
||||
request3.add("Cookie", "cookie1=value1");
|
||||
request3.add("cookie", "cookie2=value2");
|
||||
@@ -232,7 +232,7 @@ void HTTPRequestTest::testCookies()
|
||||
request3.getCookies(cookies4);
|
||||
assertTrue (cookies4.size() == 2);
|
||||
assertTrue (cookies4["cookie1"] == "value1");
|
||||
assertTrue (cookies4["cookie2"] == "value2");
|
||||
assertTrue (cookies4["cookie2"] == "value2");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public:
|
||||
void testInvalid2();
|
||||
void testInvalid3();
|
||||
void testCookies();
|
||||
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
||||
+65
-23
@@ -18,8 +18,10 @@
|
||||
#include "Poco/Net/HTTPClientSession.h"
|
||||
#include "Poco/Net/HTTPRequest.h"
|
||||
#include "Poco/Net/HTTPServerRequest.h"
|
||||
#include "Poco/Net/HTTPServerRequestImpl.h"
|
||||
#include "Poco/Net/HTTPResponse.h"
|
||||
#include "Poco/Net/HTTPServerResponse.h"
|
||||
#include "Poco/Net/HTTPServerSession.h"
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/StreamCopier.h"
|
||||
#include <sstream>
|
||||
@@ -51,15 +53,15 @@ namespace
|
||||
response.setChunkedTransferEncoding(true);
|
||||
else if (request.getContentLength() != HTTPMessage::UNKNOWN_CONTENT_LENGTH)
|
||||
response.setContentLength(request.getContentLength());
|
||||
|
||||
|
||||
response.setContentType(request.getContentType());
|
||||
|
||||
|
||||
std::istream& istr = request.stream();
|
||||
std::ostream& ostr = response.send();
|
||||
StreamCopier::copyStream(istr, ostr);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class EchoHeaderRequestHandler: public HTTPRequestHandler
|
||||
{
|
||||
public:
|
||||
@@ -93,7 +95,7 @@ namespace
|
||||
response.send();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class BufferRequestHandler: public HTTPRequestHandler
|
||||
{
|
||||
public:
|
||||
@@ -103,7 +105,22 @@ namespace
|
||||
response.sendBuffer(data.data(), data.length());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class TrailerRequestHandler: public HTTPRequestHandler
|
||||
{
|
||||
public:
|
||||
void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
|
||||
{
|
||||
std::string data("xxxxxxxxxx");
|
||||
|
||||
response.setChunkedTransferEncoding(true);
|
||||
Poco::Net::MessageHeader& trailer = static_cast<Poco::Net::HTTPServerRequestImpl&>(request).session().responseTrailer();
|
||||
trailer.set("Trailer-1", "Value 1");
|
||||
trailer.set("Trailer-2", "Value 2");
|
||||
response.send() << data;
|
||||
}
|
||||
};
|
||||
|
||||
class RequestHandlerFactory: public HTTPRequestHandlerFactory
|
||||
{
|
||||
public:
|
||||
@@ -114,11 +131,13 @@ namespace
|
||||
else if (request.getURI() == "/echoHeader")
|
||||
return new EchoHeaderRequestHandler;
|
||||
else if (request.getURI() == "/redirect")
|
||||
return new RedirectRequestHandler();
|
||||
return new RedirectRequestHandler;
|
||||
else if (request.getURI() == "/auth")
|
||||
return new AuthRequestHandler();
|
||||
return new AuthRequestHandler;
|
||||
else if (request.getURI() == "/buffer")
|
||||
return new BufferRequestHandler();
|
||||
return new BufferRequestHandler;
|
||||
else if (request.getURI() == "/trailer")
|
||||
return new TrailerRequestHandler;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -143,7 +162,7 @@ void HTTPServerTest::testIdentityRequest()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("POST", "/echoBody");
|
||||
@@ -166,7 +185,7 @@ void HTTPServerTest::testPutIdentityRequest()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("PUT", "/echoBody");
|
||||
@@ -189,7 +208,7 @@ void HTTPServerTest::testChunkedRequest()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("POST", "/echoBody");
|
||||
@@ -213,7 +232,7 @@ void HTTPServerTest::testClosedRequest()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("POST", "/echoBody");
|
||||
@@ -233,7 +252,7 @@ void HTTPServerTest::testIdentityRequestKeepAlive()
|
||||
{
|
||||
HTTPServer srv(new RequestHandlerFactory, 8008);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", srv.socket().address().port());
|
||||
cs.setKeepAlive(true);
|
||||
std::string body(5000, 'x');
|
||||
@@ -248,7 +267,7 @@ void HTTPServerTest::testIdentityRequestKeepAlive()
|
||||
assertTrue (response.getContentType() == "text/plain");
|
||||
assertTrue (response.getKeepAlive());
|
||||
assertTrue (rbody == body);
|
||||
|
||||
|
||||
body.assign(1000, 'y');
|
||||
request.setContentLength((int) body.length());
|
||||
request.setKeepAlive(false);
|
||||
@@ -264,7 +283,7 @@ void HTTPServerTest::testChunkedRequestKeepAlive()
|
||||
{
|
||||
HTTPServer srv(new RequestHandlerFactory, 8009);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", srv.socket().address().port());
|
||||
cs.setKeepAlive(true);
|
||||
std::string body(5000, 'x');
|
||||
@@ -296,7 +315,7 @@ void HTTPServerTest::testClosedRequestKeepAlive()
|
||||
{
|
||||
HTTPServer srv(new RequestHandlerFactory, 8010);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", srv.socket().address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("POST", "/echoBody");
|
||||
@@ -321,7 +340,7 @@ void HTTPServerTest::testMaxKeepAlive()
|
||||
pParams->setMaxKeepAliveRequests(4);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
cs.setKeepAlive(true);
|
||||
HTTPRequest request("POST", "/echoBody", HTTPMessage::HTTP_1_1);
|
||||
@@ -377,7 +396,7 @@ void HTTPServerTest::testKeepAliveTimeout()
|
||||
pParams->setKeepAliveTimeout(Poco::Timespan(3, 0));
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
cs.setKeepAlive(true);
|
||||
cs.setKeepAliveTimeout(Poco::Timespan(2, 0));
|
||||
@@ -421,7 +440,7 @@ void HTTPServerTest::test100Continue()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
std::string body(5000, 'x');
|
||||
HTTPRequest request("POST", "/echoBody");
|
||||
@@ -445,7 +464,7 @@ void HTTPServerTest::testRedirect()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
HTTPRequest request("GET", "/redirect");
|
||||
cs.sendRequest(request);
|
||||
@@ -465,7 +484,7 @@ void HTTPServerTest::testAuth()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
HTTPRequest request("GET", "/auth");
|
||||
cs.sendRequest(request);
|
||||
@@ -485,7 +504,7 @@ void HTTPServerTest::testNotImpl()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
HTTPRequest request("GET", "/notImpl");
|
||||
cs.sendRequest(request);
|
||||
@@ -504,7 +523,7 @@ void HTTPServerTest::testBuffer()
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
HTTPRequest request("GET", "/buffer");
|
||||
cs.sendRequest(request);
|
||||
@@ -516,6 +535,28 @@ void HTTPServerTest::testBuffer()
|
||||
}
|
||||
|
||||
|
||||
void HTTPServerTest::testChunkedTrailer()
|
||||
{
|
||||
ServerSocket svs(0);
|
||||
HTTPServerParams* pParams = new HTTPServerParams;
|
||||
pParams->setKeepAlive(false);
|
||||
HTTPServer srv(new RequestHandlerFactory, svs, pParams);
|
||||
srv.start();
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", svs.address().port());
|
||||
HTTPRequest request("GET", "/trailer");
|
||||
cs.sendRequest(request);
|
||||
HTTPResponse response;
|
||||
std::string rbody;
|
||||
cs.receiveResponse(response) >> rbody;
|
||||
assertTrue (response.getStatus() == HTTPResponse::HTTP_OK);
|
||||
assertTrue (rbody == "xxxxxxxxxx");
|
||||
assertTrue (!cs.responseTrailer().empty());
|
||||
assertTrue (cs.responseTrailer().get("Trailer-1") == "Value 1");
|
||||
assertTrue (cs.responseTrailer().get("Trailer-2") == "Value 2");
|
||||
}
|
||||
|
||||
|
||||
void HTTPServerTest::setUp()
|
||||
{
|
||||
}
|
||||
@@ -544,6 +585,7 @@ CppUnit::Test* HTTPServerTest::suite()
|
||||
CppUnit_addTest(pSuite, HTTPServerTest, testAuth);
|
||||
CppUnit_addTest(pSuite, HTTPServerTest, testNotImpl);
|
||||
CppUnit_addTest(pSuite, HTTPServerTest, testBuffer);
|
||||
CppUnit_addTest(pSuite, HTTPServerTest, testChunkedTrailer);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
void testAuth();
|
||||
void testNotImpl();
|
||||
void testBuffer();
|
||||
void testChunkedTrailer();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
+24
-9
@@ -101,7 +101,7 @@ void HTTPTestServer::run()
|
||||
|
||||
bool HTTPTestServer::requestComplete() const
|
||||
{
|
||||
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
||||
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
||||
(_lastRequest.find("\r\n\r\n") != std::string::npos)) ||
|
||||
(_lastRequest.find("\r\n0\r\n") != std::string::npos);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ std::string HTTPTestServer::handleRequest() const
|
||||
std::string body(SMALL_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
@@ -132,7 +132,7 @@ std::string HTTPTestServer::handleRequest() const
|
||||
std::string body(LARGE_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
@@ -150,7 +150,7 @@ std::string HTTPTestServer::handleRequest() const
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
if (_lastRequest.find("Content-Length") != std::string::npos)
|
||||
{
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
}
|
||||
@@ -180,7 +180,7 @@ std::string HTTPTestServer::handleRequest() const
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
if (_lastRequest.find("Content-Length") != std::string::npos)
|
||||
{
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
}
|
||||
@@ -198,13 +198,13 @@ std::string HTTPTestServer::handleRequest() const
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: keep-alive\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: Keep-Alive\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
response.append(body);
|
||||
@@ -220,10 +220,25 @@ std::string HTTPTestServer::handleRequest() const
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: close\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
}
|
||||
else if (_lastRequest.substr(0, 12) == "GET /trailer")
|
||||
{
|
||||
std::string body(LARGE_BODY);
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: keep-alive\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Transfer-Encoding: chunked\r\n\r\n");
|
||||
response.append(NumberFormatter::formatHex((unsigned) body.length()));
|
||||
response.append("\r\n");
|
||||
response.append(body);
|
||||
response.append("\r\n0\r\n");
|
||||
response.append("Trailer-1: Value 1\r\n");
|
||||
response.append("Trailer-2: Value 2\r\n");
|
||||
response.append("\r\n");
|
||||
}
|
||||
else if (_lastRequest.substr(0, 13) == "GET /redirect")
|
||||
{
|
||||
response.append("HTTP/1.0 302 Found\r\n");
|
||||
@@ -241,7 +256,7 @@ std::string HTTPTestServer::handleRequest() const
|
||||
std::string body(SMALL_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
|
||||
+4
-4
@@ -33,15 +33,15 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
|
||||
const std::string& lastRequest() const;
|
||||
/// Returns the last request.
|
||||
|
||||
static const std::string SMALL_BODY;
|
||||
static const std::string LARGE_BODY;
|
||||
static const std::string LARGE_BODY;
|
||||
|
||||
protected:
|
||||
bool requestComplete() const;
|
||||
@@ -51,7 +51,7 @@ private:
|
||||
Poco::Net::ServerSocket _socket;
|
||||
Poco::Thread _thread;
|
||||
Poco::Event _ready;
|
||||
bool _stop;
|
||||
std::atomic<bool> _stop;
|
||||
std::string _lastRequest;
|
||||
};
|
||||
|
||||
|
||||
+8
-8
@@ -35,7 +35,7 @@ using Poco::AutoPtr;
|
||||
Poco::FastMutex ICMPClientTest::_mutex;
|
||||
|
||||
|
||||
ICMPClientTest::ICMPClientTest(const std::string& name):
|
||||
ICMPClientTest::ICMPClientTest(const std::string& name):
|
||||
CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
@@ -59,7 +59,7 @@ void ICMPClientTest::testPing()
|
||||
assertTrue (icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
#else
|
||||
assertTrue (icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
assertTrue (icmpClient.ping("github.com", 4) > 0);
|
||||
|
||||
// warning: may fail depending on the existence of the addresses at test site
|
||||
// if so, adjust accordingly (i.e. specify non-existent or unreachable IP addresses)
|
||||
@@ -86,7 +86,7 @@ void ICMPClientTest::testBigPing()
|
||||
assertTrue (icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
#else
|
||||
assertTrue (icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
assertTrue (icmpClient.ping("github.com", 4) > 0);
|
||||
|
||||
// warning: may fail depending on the existence of the addresses at test site
|
||||
// if so, adjust accordingly (i.e. specify non-existent or unreachable IP addresses)
|
||||
@@ -132,8 +132,8 @@ void ICMPClientTest::onBegin(const void* pSender, ICMPEventArgs& args)
|
||||
{
|
||||
Poco::FastMutex::ScopedLock l(_mutex);
|
||||
std::ostringstream os;
|
||||
os << std::endl << "Pinging " << args.hostName() << " [" << args.hostAddress() << "] with "
|
||||
<< args.dataSize() << " bytes of data:"
|
||||
os << std::endl << "Pinging " << args.hostName() << " [" << args.hostAddress() << "] with "
|
||||
<< args.dataSize() << " bytes of data:"
|
||||
<< std::endl << "-------------------------------------------------------" << std::endl;
|
||||
std::cout << os.str() << std::endl;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ void ICMPClientTest::onReply(const void* pSender, ICMPEventArgs& args)
|
||||
Poco::FastMutex::ScopedLock l(_mutex);
|
||||
std::ostringstream os;
|
||||
os << "Reply from " << args.hostAddress()
|
||||
<< " bytes=" << args.dataSize()
|
||||
<< " bytes=" << args.dataSize()
|
||||
<< " time=" << args.replyTime() << "ms"
|
||||
<< " TTL=" << args.ttl();
|
||||
std::cout << os.str() << std::endl;
|
||||
@@ -169,8 +169,8 @@ void ICMPClientTest::onEnd(const void* pSender, ICMPEventArgs& args)
|
||||
<< std::endl << "Packets: Sent=" << args.sent() << ", Received=" << received
|
||||
<< " Lost=" << args.repetitions() - received << " (" << 100.0 - args.percent() << "% loss),"
|
||||
<< std::endl << "Approximate round trip times in milliseconds: " << std::endl
|
||||
<< "Minimum=" << args.minRTT() << "ms, Maximum=" << args.maxRTT()
|
||||
<< "ms, Average=" << args.avgRTT() << "ms"
|
||||
<< "Minimum=" << args.minRTT() << "ms, Maximum=" << args.maxRTT()
|
||||
<< "ms, Average=" << args.avgRTT() << "ms"
|
||||
<< std::endl << "-----------------------------------------------" << std::endl;
|
||||
std::cout << os.str() << std::endl;
|
||||
}
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ void ICMPSocketTest::testSendToReceiveFrom()
|
||||
{
|
||||
ICMPSocket ss(IPAddress::IPv4);
|
||||
|
||||
SocketAddress sa("www.appinf.com", 0);
|
||||
SocketAddress sa("github.com", 0);
|
||||
SocketAddress sr(sa);
|
||||
|
||||
try
|
||||
@@ -90,7 +90,7 @@ void ICMPSocketTest::testMTU()
|
||||
std::cout << addr.toString() << " : MTU=" << mtu << std::endl;
|
||||
assertTrue (mtu != 0);
|
||||
sz = 1500;
|
||||
addr = SocketAddress("www.appinf.com:0");
|
||||
addr = SocketAddress("github.com:0");
|
||||
mtu = ICMPSocket::mtu(addr, sz);
|
||||
std::cout << addr.toString() << " : MTU=" << mtu << std::endl;
|
||||
assertTrue (mtu != 0 && mtu <= sz);
|
||||
|
||||
+80
-17
@@ -31,14 +31,16 @@ IPAddressTest::~IPAddressTest()
|
||||
|
||||
void IPAddressTest::testStringConv()
|
||||
{
|
||||
IPAddress ia1("127.0.0.1");
|
||||
IPAddress ia01 = IPAddress("127.0.0.1");
|
||||
IPAddress ia1(std::move(ia01));
|
||||
assertTrue (ia1.family() == IPAddress::IPv4);
|
||||
assertTrue (ia1.toString() == "127.0.0.1");
|
||||
|
||||
IPAddress ia2("192.168.1.120");
|
||||
IPAddress ia02 = IPAddress("192.168.1.120");
|
||||
IPAddress ia2(std::move(ia02));
|
||||
assertTrue (ia2.family() == IPAddress::IPv4);
|
||||
assertTrue (ia2.toString() == "192.168.1.120");
|
||||
|
||||
|
||||
IPAddress ia3("255.255.255.255");
|
||||
assertTrue (ia3.family() == IPAddress::IPv4);
|
||||
assertTrue (ia3.toString() == "255.255.255.255");
|
||||
@@ -56,18 +58,21 @@ void IPAddressTest::testStringConv()
|
||||
void IPAddressTest::testStringConv6()
|
||||
{
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
IPAddress ia0("::1");
|
||||
IPAddress ia00 = IPAddress("::1");
|
||||
IPAddress ia0(std::move(ia00));
|
||||
assertTrue (ia0.family() == IPAddress::IPv6);
|
||||
assertTrue (ia0.toString() == "::1");
|
||||
|
||||
IPAddress ia1("1080:0:0:0:8:600:200a:425c");
|
||||
IPAddress ia01 = IPAddress("1080:0:0:0:8:600:200a:425c");
|
||||
IPAddress ia1(std::move(ia01));
|
||||
assertTrue (ia1.family() == IPAddress::IPv6);
|
||||
assertTrue (ia1.toString() == "1080::8:600:200a:425c");
|
||||
|
||||
IPAddress ia2("1080::8:600:200A:425C");
|
||||
IPAddress ia02 = IPAddress("1080::8:600:200A:425C");
|
||||
IPAddress ia2(std::move(ia02));
|
||||
assertTrue (ia2.family() == IPAddress::IPv6);
|
||||
assertTrue (ia2.toString() == "1080::8:600:200a:425c");
|
||||
|
||||
|
||||
IPAddress ia3("::192.168.1.120");
|
||||
assertTrue (ia3.family() == IPAddress::IPv6);
|
||||
assertTrue (ia3.toString() == "::192.168.1.120");
|
||||
@@ -94,8 +99,9 @@ void IPAddressTest::testStringConv6()
|
||||
void IPAddressTest::testParse()
|
||||
{
|
||||
IPAddress ip;
|
||||
assertTrue (IPAddress::tryParse("0.0.0.0", ip));
|
||||
assertTrue (IPAddress::tryParse("255.255.255.255", ip));
|
||||
assertTrue (IPAddress::tryParse("192.168.1.120", ip));
|
||||
|
||||
assertTrue (!IPAddress::tryParse("192.168.1.280", ip));
|
||||
|
||||
ip = IPAddress::parse("192.168.1.120");
|
||||
@@ -103,10 +109,37 @@ void IPAddressTest::testParse()
|
||||
{
|
||||
ip = IPAddress::parse("192.168.1.280");
|
||||
fail("bad address - must throw");
|
||||
}
|
||||
}
|
||||
catch (InvalidAddressException&)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
assertTrue (IPAddress::tryParse("::", ip));
|
||||
assertFalse (IPAddress::tryParse(":::", ip));
|
||||
assertTrue (IPAddress::tryParse("0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0:0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0:0:0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0:0:0:0:0::", ip));
|
||||
assertTrue (IPAddress::tryParse("0:0:0:0:0:0:0:0", ip));
|
||||
assertFalse (IPAddress::tryParse("0:0:0:0:0:0:0:0:", ip));
|
||||
assertFalse (IPAddress::tryParse("::0:0::", ip));
|
||||
assertFalse (IPAddress::tryParse("::0::0::", ip));
|
||||
|
||||
assertTrue (IPAddress::tryParse("::1", ip));
|
||||
assertTrue (IPAddress::tryParse("1080:0:0:0:8:600:200a:425c", ip));
|
||||
assertTrue (IPAddress::tryParse("1080::8:600:200a:425c", ip));
|
||||
assertTrue (IPAddress::tryParse("1080::8:600:200A:425C", ip));
|
||||
assertTrue (IPAddress::tryParse("1080::8:600:200a:425c", ip));
|
||||
assertTrue (IPAddress::tryParse("::192.168.1.120", ip));
|
||||
assertTrue (IPAddress::tryParse("::ffff:192.168.1.120", ip));
|
||||
assertTrue (IPAddress::tryParse("::ffff:192.168.1.120", ip));
|
||||
assertTrue (IPAddress::tryParse("ffff:ffff:ffff:ffff::", ip));
|
||||
assertTrue (IPAddress::tryParse("ffff:ffff::", ip));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +159,7 @@ void IPAddressTest::testClassification()
|
||||
assertTrue (!ip1.isSiteLocalMC());
|
||||
assertTrue (!ip1.isOrgLocalMC());
|
||||
assertTrue (!ip1.isGlobalMC());
|
||||
|
||||
|
||||
IPAddress ip2("255.255.255.255"); // broadcast
|
||||
assertTrue (!ip2.isWildcard());
|
||||
assertTrue (ip2.isBroadcast());
|
||||
@@ -141,7 +174,7 @@ void IPAddressTest::testClassification()
|
||||
assertTrue (!ip2.isSiteLocalMC());
|
||||
assertTrue (!ip2.isOrgLocalMC());
|
||||
assertTrue (!ip2.isGlobalMC());
|
||||
|
||||
|
||||
IPAddress ip3("127.0.0.1"); // loopback
|
||||
assertTrue (!ip3.isWildcard());
|
||||
assertTrue (!ip3.isBroadcast());
|
||||
@@ -330,7 +363,7 @@ void IPAddressTest::testClassification6()
|
||||
assertTrue (!ip1.isSiteLocalMC());
|
||||
assertTrue (!ip1.isOrgLocalMC());
|
||||
assertTrue (!ip1.isGlobalMC());
|
||||
|
||||
|
||||
IPAddress ip3("::1"); // loopback
|
||||
assertTrue (!ip3.isWildcard());
|
||||
assertTrue (!ip3.isBroadcast());
|
||||
@@ -420,6 +453,36 @@ void IPAddressTest::testClassification6()
|
||||
assertTrue (!ip7.isSiteLocalMC());
|
||||
assertTrue (!ip7.isOrgLocalMC());
|
||||
assertTrue (!ip7.isGlobalMC());
|
||||
|
||||
IPAddress ip8("::ffff:127.0.0.1"); // IPv4-mapped loopback
|
||||
assertTrue (!ip3.isWildcard());
|
||||
assertTrue (!ip3.isBroadcast());
|
||||
assertTrue (ip3.isLoopback());
|
||||
assertTrue (!ip3.isMulticast());
|
||||
assertTrue (ip3.isUnicast());
|
||||
assertTrue (!ip3.isLinkLocal());
|
||||
assertTrue (!ip3.isSiteLocal());
|
||||
assertTrue (!ip3.isWellKnownMC());
|
||||
assertTrue (!ip3.isNodeLocalMC());
|
||||
assertTrue (!ip3.isLinkLocalMC());
|
||||
assertTrue (!ip3.isSiteLocalMC());
|
||||
assertTrue (!ip3.isOrgLocalMC());
|
||||
assertTrue (!ip3.isGlobalMC());
|
||||
|
||||
IPAddress ip9("::ffff:127.255.255.254"); // IPv4-mapped loopback
|
||||
assertTrue (!ip3.isWildcard());
|
||||
assertTrue (!ip3.isBroadcast());
|
||||
assertTrue (ip3.isLoopback());
|
||||
assertTrue (!ip3.isMulticast());
|
||||
assertTrue (ip3.isUnicast());
|
||||
assertTrue (!ip3.isLinkLocal());
|
||||
assertTrue (!ip3.isSiteLocal());
|
||||
assertTrue (!ip3.isWellKnownMC());
|
||||
assertTrue (!ip3.isNodeLocalMC());
|
||||
assertTrue (!ip3.isLinkLocalMC());
|
||||
assertTrue (!ip3.isSiteLocalMC());
|
||||
assertTrue (!ip3.isOrgLocalMC());
|
||||
assertTrue (!ip3.isGlobalMC());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -437,7 +500,7 @@ void IPAddressTest::testMCClassification6()
|
||||
assertTrue (!ip1.isSiteLocal());
|
||||
assertTrue (ip1.isWellKnownMC());
|
||||
assertTrue (!ip1.isNodeLocalMC());
|
||||
assertTrue (ip1.isLinkLocalMC());
|
||||
assertTrue (ip1.isLinkLocalMC());
|
||||
assertTrue (!ip1.isSiteLocalMC());
|
||||
assertTrue (!ip1.isOrgLocalMC());
|
||||
assertTrue (!ip1.isGlobalMC());
|
||||
@@ -455,7 +518,7 @@ void IPAddressTest::testMCClassification6()
|
||||
assertTrue (!ip2.isLinkLocalMC());
|
||||
assertTrue (!ip2.isSiteLocalMC());
|
||||
assertTrue (!ip2.isOrgLocalMC());
|
||||
assertTrue (!ip2.isGlobalMC());
|
||||
assertTrue (!ip2.isGlobalMC());
|
||||
|
||||
IPAddress ip3("ff05:0:0:0:0:0:0:FB"); // site local unicast
|
||||
assertTrue (!ip3.isWildcard());
|
||||
@@ -497,7 +560,7 @@ void IPAddressTest::testMCClassification6()
|
||||
assertTrue (!ip5.isSiteLocal());
|
||||
assertTrue (!ip5.isWellKnownMC());
|
||||
assertTrue (!ip5.isNodeLocalMC());
|
||||
assertTrue (!ip5.isLinkLocalMC());
|
||||
assertTrue (!ip5.isLinkLocalMC());
|
||||
assertTrue (!ip5.isSiteLocalMC());
|
||||
assertTrue (!ip5.isOrgLocalMC());
|
||||
assertTrue (ip5.isGlobalMC());
|
||||
@@ -511,7 +574,7 @@ void IPAddressTest::testRelationals()
|
||||
IPAddress ip2(ip1);
|
||||
IPAddress ip3;
|
||||
IPAddress ip4("10.0.0.138");
|
||||
|
||||
|
||||
assertTrue (ip1 != ip4);
|
||||
assertTrue (ip1 == ip2);
|
||||
assertTrue (!(ip1 != ip2));
|
||||
@@ -524,7 +587,7 @@ void IPAddressTest::testRelationals()
|
||||
assertTrue (!(ip1 <= ip4));
|
||||
assertTrue (!(ip4 > ip1));
|
||||
assertTrue (!(ip4 >= ip1));
|
||||
|
||||
|
||||
ip3 = ip1;
|
||||
assertTrue (ip1 == ip3);
|
||||
ip3 = ip4;
|
||||
|
||||
+133
-27
@@ -12,6 +12,7 @@
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/MailMessage.h"
|
||||
#include "Poco/Net/MailStream.h"
|
||||
#include "Poco/Net/MailRecipient.h"
|
||||
#include "Poco/Net/PartHandler.h"
|
||||
#include "Poco/Net/StringPartSource.h"
|
||||
@@ -20,11 +21,16 @@
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/FileStream.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/TemporaryFile.h"
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::Net::MailMessage;
|
||||
using Poco::Net::MailInputStream;
|
||||
using Poco::Net::MailOutputStream;
|
||||
using Poco::Net::MailRecipient;
|
||||
using Poco::Net::MessageHeader;
|
||||
using Poco::Net::PartHandler;
|
||||
@@ -36,6 +42,7 @@ using Poco::Timestamp;
|
||||
using Poco::FileInputStream;
|
||||
using Poco::replaceInPlace;
|
||||
using Poco::icompare;
|
||||
using Poco::TemporaryFile;
|
||||
|
||||
|
||||
namespace
|
||||
@@ -46,7 +53,7 @@ namespace
|
||||
StringPartHandler()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void handlePart(const MessageHeader& header, std::istream& stream)
|
||||
{
|
||||
_disp.push_back(header["Content-Disposition"]);
|
||||
@@ -60,7 +67,7 @@ namespace
|
||||
}
|
||||
_data.push_back(data);
|
||||
}
|
||||
|
||||
|
||||
const std::vector<std::string>& data() const
|
||||
{
|
||||
return _data;
|
||||
@@ -75,7 +82,7 @@ namespace
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::vector<std::string> _data;
|
||||
std::vector<std::string> _disp;
|
||||
@@ -115,14 +122,14 @@ void MailMessageTest::testWriteQP()
|
||||
);
|
||||
Timestamp ts(0);
|
||||
message.setDate(ts);
|
||||
|
||||
|
||||
assertTrue (!message.isMultipart());
|
||||
|
||||
|
||||
std::ostringstream str;
|
||||
message.write(str);
|
||||
std::string s = str.str();
|
||||
|
||||
assertTrue (s ==
|
||||
assertTrue (s ==
|
||||
"Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n"
|
||||
"Content-Type: text/plain\r\n"
|
||||
"Subject: Test Message\r\n"
|
||||
@@ -154,11 +161,11 @@ void MailMessageTest::testWrite8Bit()
|
||||
);
|
||||
Timestamp ts(0);
|
||||
message.setDate(ts);
|
||||
|
||||
|
||||
std::ostringstream str;
|
||||
message.write(str);
|
||||
std::string s = str.str();
|
||||
assertTrue (s ==
|
||||
assertTrue (s ==
|
||||
"Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n"
|
||||
"Content-Type: text/plain\r\n"
|
||||
"Subject: Test Message\r\n"
|
||||
@@ -190,7 +197,7 @@ void MailMessageTest::testWriteBase64()
|
||||
std::ostringstream str;
|
||||
message.write(str);
|
||||
std::string s = str.str();
|
||||
assertTrue (s ==
|
||||
assertTrue (s ==
|
||||
"Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n"
|
||||
"Content-Type: text/plain\r\n"
|
||||
"Subject: Test Message\r\n"
|
||||
@@ -226,11 +233,11 @@ void MailMessageTest::testWriteManyRecipients()
|
||||
);
|
||||
Timestamp ts(0);
|
||||
message.setDate(ts);
|
||||
|
||||
|
||||
std::ostringstream str;
|
||||
message.write(str);
|
||||
std::string s = str.str();
|
||||
assertTrue (s ==
|
||||
assertTrue (s ==
|
||||
"Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n"
|
||||
"Content-Type: text/plain\r\n"
|
||||
"Subject: Test Message\r\n"
|
||||
@@ -321,13 +328,13 @@ void MailMessageTest::testReadQP()
|
||||
"his should be enough.\r\n"
|
||||
"And here is some more =3Dfe.\r\n"
|
||||
);
|
||||
|
||||
|
||||
MailMessage message;
|
||||
message.read(istr);
|
||||
|
||||
|
||||
assertTrue (message.getSender() == "poco@appinf.com");
|
||||
assertTrue (message.getContentType() == "text/plain");
|
||||
assertTrue (message.getContent() ==
|
||||
assertTrue (message.getContent() ==
|
||||
"Hello, world!\r\n"
|
||||
"This is a test for the MailMessage class.\r\n"
|
||||
"To test the quoted-printable encoding, we'll put an extra long line here. This should be enough.\r\n"
|
||||
@@ -361,6 +368,55 @@ void MailMessageTest::testReadDefaultTransferEncoding()
|
||||
}
|
||||
|
||||
|
||||
void MailMessageTest::testContentDisposition()
|
||||
{
|
||||
/*
|
||||
// see https://github.com/pocoproject/poco/issues/3650
|
||||
// Note "Content-disposition" casing,
|
||||
// "Content-type" or "Content-transfer-encoding" do not cause problem
|
||||
auto rawMessage =
|
||||
"Date: Wed, 29 Jun 2022 08:25:48 GMT" "\r\n"
|
||||
"Content-Type: multipart/mixed; boundary=MIME_boundary_5DBC66DE2780DE93" "\r\n"
|
||||
"From: mySenderName<sender@send.pl>" "\r\n"
|
||||
"Subject: mySubjct" "\r\n"
|
||||
"To: <aja@o.pl>" "\r\n"
|
||||
"Mime-Version: 1.0" "\r\n"
|
||||
"\r\n"
|
||||
"--MIME_boundary_5DBC66DE2780DE93" "\r\n"
|
||||
"Content-Type: text/plain; charset=UTF-8" "\r\n"
|
||||
"Content-Transfer-Encoding: quoted-printable" "\r\n"
|
||||
"Content-Disposition: inline" "\r\n"
|
||||
"\r\n"
|
||||
"MyRealContent" "\r\n"
|
||||
"--MIME_boundary_5DBC66DE2780DE93" "\r\n"
|
||||
"Content-Type: text/plain; name=Plik" "\r\n"
|
||||
"Content-Transfer-Encoding: base64" "\r\n"
|
||||
"Content-disposition: attachment; filename=attachment.txt" "\r\n"
|
||||
"\r\n"
|
||||
"TXlBdHRhY2htZW50" "\r\n"
|
||||
"--MIME_boundary_5DBC66DE2780DE93--" "\r\n"
|
||||
"." "\r\n";
|
||||
|
||||
Poco::Net::MailMessage message;
|
||||
//Convert raw message to message
|
||||
std::istringstream is(rawMessage);
|
||||
MailInputStream mis(is);
|
||||
message.read(mis);
|
||||
|
||||
//get raw message again:
|
||||
std::ostringstream oss;
|
||||
MailOutputStream mos(oss);
|
||||
message.write(mos);
|
||||
mos.close();
|
||||
auto plainMessage = oss.str();
|
||||
|
||||
assertEqual(rawMessage, plainMessage);
|
||||
|
||||
//std::cout << plain_message <<std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void MailMessageTest::testRead8Bit()
|
||||
{
|
||||
std::istringstream istr(
|
||||
@@ -374,13 +430,13 @@ void MailMessageTest::testRead8Bit()
|
||||
"Hello, world!\r\n"
|
||||
"This is a test for the MailMessage class.\r\n"
|
||||
);
|
||||
|
||||
|
||||
MailMessage message;
|
||||
message.read(istr);
|
||||
|
||||
|
||||
assertTrue (message.getSender() == "poco@appinf.com");
|
||||
assertTrue (message.getContentType() == "text/plain");
|
||||
assertTrue (message.getContent() ==
|
||||
assertTrue (message.getContent() ==
|
||||
"Hello, world!\r\n"
|
||||
"This is a test for the MailMessage class.\r\n"
|
||||
);
|
||||
@@ -413,11 +469,11 @@ void MailMessageTest::testReadMultiPart()
|
||||
"VGhpcyBpcyBzb21lIGJpbmFyeSBkYXRhLiBSZWFsbHku\r\n"
|
||||
"--MIME_boundary_01234567--\r\n"
|
||||
);
|
||||
|
||||
|
||||
StringPartHandler handler;
|
||||
MailMessage message;
|
||||
message.read(istr, handler);
|
||||
|
||||
|
||||
assertTrue (handler.data().size() == 2);
|
||||
assertTrue (handler.data()[0] == "Hello World!\r\n");
|
||||
assertTrue (handler.type()[0] == "text/plain");
|
||||
@@ -455,10 +511,10 @@ void MailMessageTest::testReadMultiPartWithAttachmentNames()
|
||||
"VGhpcyBpcyBzb21lIGJpbmFyeSBkYXRhLiBSZWFsbHku\r\n"
|
||||
"--MIME_boundary_01234567--\r\n"
|
||||
);
|
||||
|
||||
|
||||
MailMessage message;
|
||||
message.read(istr);
|
||||
|
||||
|
||||
assertTrue (message.parts().size() == 2);
|
||||
assertTrue (message.parts()[1].name == "sample");
|
||||
assertTrue (message.parts()[1].pSource->filename() == "sample.dat");
|
||||
@@ -506,6 +562,54 @@ void MailMessageTest::testReadMultiPartDefaultTransferEncoding()
|
||||
}
|
||||
|
||||
|
||||
void MailMessageTest::testReadMultiPartNoFinalBoundaryFromFile()
|
||||
{
|
||||
std::string data(
|
||||
"Content-Type: multipart/mixed; boundary=MIME_boundary_01234567\r\n"
|
||||
"Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n"
|
||||
"From: poco@appinf.com\r\n"
|
||||
"Mime-Version: 1.0\r\n"
|
||||
"Subject: Test Message\r\n"
|
||||
"To: John Doe <john.doe@no.where>\r\n"
|
||||
"\r\n"
|
||||
"\r\n"
|
||||
"--MIME_boundary_01234567\r\n"
|
||||
"Content-Disposition: inline\r\n"
|
||||
"Content-Transfer-Encoding: 8bit\r\n"
|
||||
"Content-Type: text/plain\r\n"
|
||||
"\r\n"
|
||||
"Hello World!\r\n"
|
||||
"\r\n"
|
||||
"--MIME_boundary_01234567\r\n"
|
||||
"Content-Disposition: attachment; filename=sample.dat\r\n"
|
||||
"Content-Transfer-Encoding: base64\r\n"
|
||||
"Content-Type: application/octet-stream; name=sample\r\n"
|
||||
"\r\n"
|
||||
"VGhpcyBpcyBzb21lIGJpbmFyeSBkYXRhLiBSZWFsbHku\r\n"
|
||||
);
|
||||
|
||||
// The problem occurs during reading message from file.
|
||||
// (For stringstreams it works fine.)
|
||||
// https://github.com/pocoproject/poco/issues/2401
|
||||
TemporaryFile file;
|
||||
std::ofstream(file.path()) << data;
|
||||
std::ifstream istr(file.path());
|
||||
|
||||
StringPartHandler handler;
|
||||
MailMessage message;
|
||||
message.read(istr, handler);
|
||||
|
||||
assertTrue (handler.data().size() == 2);
|
||||
assertTrue (handler.data()[0] == "Hello World!\r\n");
|
||||
assertTrue (handler.type()[0] == "text/plain");
|
||||
assertTrue (handler.disp()[0] == "inline");
|
||||
|
||||
assertTrue (handler.data()[1] == "This is some binary data. Really.");
|
||||
assertTrue (handler.type()[1] == "application/octet-stream; name=sample");
|
||||
assertTrue (handler.disp()[1] == "attachment; filename=sample.dat");
|
||||
}
|
||||
|
||||
|
||||
void MailMessageTest::testReadWriteMultiPart()
|
||||
{
|
||||
std::string msgin(
|
||||
@@ -539,7 +643,7 @@ void MailMessageTest::testReadWriteMultiPart()
|
||||
|
||||
message.read(istr);
|
||||
message.write(ostr);
|
||||
|
||||
|
||||
std::string msgout(ostr.str());
|
||||
assertTrue (msgout == msgin);
|
||||
}
|
||||
@@ -578,7 +682,7 @@ void MailMessageTest::testReadWriteMultiPartStore()
|
||||
MailMessage message(&pfsf);
|
||||
|
||||
message.read(istr);
|
||||
|
||||
|
||||
MailMessage::PartVec::const_iterator it = message.parts().begin();
|
||||
MailMessage::PartVec::const_iterator end = message.parts().end();
|
||||
for (; it != end; ++it)
|
||||
@@ -593,7 +697,7 @@ void MailMessageTest::testReadWriteMultiPartStore()
|
||||
// filename is not the same as attachment name
|
||||
std::size_t sz = (path.size() > filename.size()) ? filename.size() : path.size();
|
||||
assertTrue (0 != icompare(path, path.size() - sz, sz, path));
|
||||
|
||||
|
||||
Poco::FileInputStream fis(path);
|
||||
assertTrue (fis.good());
|
||||
std::string read;
|
||||
@@ -604,7 +708,7 @@ void MailMessageTest::testReadWriteMultiPartStore()
|
||||
assertTrue (read == "This is some binary data. Really.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.write(ostr);
|
||||
std::string msgout(ostr.str());
|
||||
assertTrue (msgout == msgin);
|
||||
@@ -616,11 +720,11 @@ void MailMessageTest::testEncodeWord()
|
||||
std::string plain("this is pure ASCII");
|
||||
std::string encoded = MailMessage::encodeWord(plain, "ISO-8859-1");
|
||||
assertTrue (encoded == plain);
|
||||
|
||||
|
||||
plain = "This text contains German Umlauts: \304\326";
|
||||
encoded = MailMessage::encodeWord(plain, "ISO-8859-1");
|
||||
assertTrue (encoded == "=?ISO-8859-1?q?This_text_contains_German_Umlauts=3A_=C4=D6?=");
|
||||
|
||||
|
||||
plain = "This text contains German Umlauts: \304\326. "
|
||||
"It is also a very long text. Longer than 75 "
|
||||
"characters. Long enough to become three lines "
|
||||
@@ -654,9 +758,11 @@ CppUnit::Test* MailMessageTest::suite()
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testWriteMultiPart);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadQP);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadDefaultTransferEncoding);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testContentDisposition);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testRead8Bit);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadMultiPart);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadMultiPartDefaultTransferEncoding);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadMultiPartNoFinalBoundaryFromFile);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadWriteMultiPart);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testReadWriteMultiPartStore);
|
||||
CppUnit_addTest(pSuite, MailMessageTest, testEncodeWord);
|
||||
|
||||
@@ -32,11 +32,13 @@ public:
|
||||
void testReadWriteMultiPart();
|
||||
void testReadWriteMultiPartStore();
|
||||
void testReadDefaultTransferEncoding();
|
||||
void testContentDisposition();
|
||||
void testReadQP();
|
||||
void testRead8Bit();
|
||||
void testReadMultiPart();
|
||||
void testReadMultiPartWithAttachmentNames();
|
||||
void testReadMultiPartDefaultTransferEncoding();
|
||||
void testReadMultiPartNoFinalBoundaryFromFile();
|
||||
void testEncodeWord();
|
||||
|
||||
void setUp();
|
||||
|
||||
+4
-4
@@ -45,7 +45,7 @@ void MailStreamTest::testMailInputStream()
|
||||
"..\r\n"
|
||||
".\r\n"
|
||||
);
|
||||
|
||||
|
||||
MailInputStream mis(istr);
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(mis, ostr);
|
||||
@@ -60,7 +60,7 @@ void MailStreamTest::testMailInputStream()
|
||||
".This line starts with a period.\r\n"
|
||||
".and this one too\r\n"
|
||||
".\r\n"
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,13 +78,13 @@ void MailStreamTest::testMailOutputStream()
|
||||
".and this one too\r\n"
|
||||
".\r\n"
|
||||
);
|
||||
|
||||
|
||||
std::ostringstream ostr;
|
||||
MailOutputStream mos(ostr);
|
||||
mos << msg;
|
||||
mos.close();
|
||||
std::string s(ostr.str());
|
||||
assertTrue (s ==
|
||||
assertTrue (s ==
|
||||
"From: john.doe@no.domain\r\n"
|
||||
"To: jane.doe@no.domain\r\n"
|
||||
"Subject: test\r\n"
|
||||
|
||||
+49
-17
@@ -37,7 +37,7 @@ void MessageHeaderTest::testWrite()
|
||||
mh.set("name1", "value1");
|
||||
mh.set("name2", "value2");
|
||||
mh.set("name3", "value3");
|
||||
|
||||
|
||||
std::ostringstream ostr;
|
||||
mh.write(ostr);
|
||||
std::string s = ostr.str();
|
||||
@@ -217,12 +217,12 @@ void MessageHeaderTest::testSplitElements()
|
||||
std::vector<std::string> v;
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.empty());
|
||||
|
||||
|
||||
s = "foo";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 1);
|
||||
assertTrue (v[0] == "foo");
|
||||
|
||||
|
||||
s = " foo ";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 1);
|
||||
@@ -233,7 +233,7 @@ void MessageHeaderTest::testSplitElements()
|
||||
assertTrue (v.size() == 2);
|
||||
assertTrue (v[0] == "foo");
|
||||
assertTrue (v[1] == "bar");
|
||||
|
||||
|
||||
s = "foo,,bar";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 2);
|
||||
@@ -257,7 +257,7 @@ void MessageHeaderTest::testSplitElements()
|
||||
assertTrue (v.size() == 2);
|
||||
assertTrue (v[0] == "foo; param=\"a,b\"");
|
||||
assertTrue (v[1] == "bar; param=\"c,d\"");
|
||||
|
||||
|
||||
s = "foo, bar, f00, baz";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 4);
|
||||
@@ -265,26 +265,26 @@ void MessageHeaderTest::testSplitElements()
|
||||
assertTrue (v[1] == "bar");
|
||||
assertTrue (v[2] == "f00");
|
||||
assertTrue (v[3] == "baz");
|
||||
|
||||
|
||||
s = "a,b,c";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 3);
|
||||
assertTrue (v[0] == "a");
|
||||
assertTrue (v[1] == "b");
|
||||
assertTrue (v[2] == "c");
|
||||
|
||||
|
||||
s = "a=\"value=\\\\\\\"foo, bar\\\\\\\"\",b=foo";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 2);
|
||||
assertTrue (v[0] == "a=\"value=\\\"foo, bar\\\"\"");
|
||||
assertTrue (v[1] == "b=foo");
|
||||
|
||||
|
||||
s = "a=\\\",b=\\\"";
|
||||
MessageHeader::splitElements(s, v);
|
||||
assertTrue (v.size() == 2);
|
||||
assertTrue (v[0] == "a=\"");
|
||||
assertTrue (v[1] == "b=\"");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -293,46 +293,46 @@ void MessageHeaderTest::testSplitParameters()
|
||||
std::string s;
|
||||
std::string v;
|
||||
NameValueCollection p;
|
||||
|
||||
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v.empty());
|
||||
assertTrue (p.empty());
|
||||
|
||||
|
||||
s = "multipart/related";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "multipart/related");
|
||||
assertTrue (p.empty());
|
||||
|
||||
|
||||
s = "multipart/related; boundary=MIME_boundary_01234567";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "multipart/related");
|
||||
assertTrue (p.size() == 1);
|
||||
assertTrue (p["boundary"] == "MIME_boundary_01234567");
|
||||
|
||||
|
||||
s = "multipart/related; boundary=\"MIME_boundary_76543210\"";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "multipart/related");
|
||||
assertTrue (p.size() == 1);
|
||||
assertTrue (p["boundary"] == "MIME_boundary_76543210");
|
||||
|
||||
|
||||
s = "text/plain; charset=us-ascii";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "text/plain");
|
||||
assertTrue (p.size() == 1);
|
||||
assertTrue (p["charset"] == "us-ascii");
|
||||
|
||||
|
||||
s = "value; p1=foo; p2=bar";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "value");
|
||||
assertTrue (p.size() == 2);
|
||||
assertTrue (p["p1"] == "foo");
|
||||
assertTrue (p["p2"] == "bar");
|
||||
|
||||
|
||||
s = "value; p1=\"foo; bar\"";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
assertTrue (v == "value");
|
||||
assertTrue (p.size() == 1);
|
||||
assertTrue (p["p1"] == "foo; bar");
|
||||
assertTrue (p["p1"] == "foo; bar");
|
||||
|
||||
s = "value ; p1=foo ; p2=bar ";
|
||||
MessageHeader::splitParameters(s, v, p);
|
||||
@@ -360,6 +360,38 @@ void MessageHeaderTest::testFieldLimit()
|
||||
}
|
||||
|
||||
|
||||
void MessageHeaderTest::testNameLengthLimit()
|
||||
{
|
||||
std::string s("name1: value1\r\n");
|
||||
std::istringstream istr(s);
|
||||
MessageHeader mh;
|
||||
mh.setNameLengthLimit(2);
|
||||
try
|
||||
{
|
||||
mh.read(istr);
|
||||
fail("Name length limit exceeded - must throw");
|
||||
}
|
||||
catch (MessageException&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void MessageHeaderTest::testValueLengthLimit()
|
||||
{
|
||||
std::string s("name1: value1\r\n");
|
||||
std::istringstream istr(s);
|
||||
MessageHeader mh;
|
||||
mh.setValueLengthLimit(2);
|
||||
try
|
||||
{
|
||||
mh.read(istr);
|
||||
fail("Value length limit exceeded - must throw");
|
||||
}
|
||||
catch (MessageException&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void MessageHeaderTest::testDecodeWord()
|
||||
{
|
||||
std::string coded("this is pure ASCII");
|
||||
|
||||
@@ -40,6 +40,8 @@ public:
|
||||
void testSplitElements();
|
||||
void testSplitParameters();
|
||||
void testFieldLimit();
|
||||
void testNameLengthLimit();
|
||||
void testValueLengthLimit();
|
||||
void testDecodeWord();
|
||||
|
||||
void setUp();
|
||||
|
||||
+3
-3
@@ -93,9 +93,9 @@ Poco::Net::NetworkInterface MulticastEchoServer::findInterface()
|
||||
NetworkInterface::Map m = NetworkInterface::map();
|
||||
for (NetworkInterface::Map::const_iterator it = m.begin(); it != m.end(); ++it)
|
||||
{
|
||||
if (it->second.supportsIPv4() &&
|
||||
it->second.firstAddress(IPAddress::IPv4).isUnicast() &&
|
||||
!it->second.isLoopback() &&
|
||||
if (it->second.supportsIPv4() &&
|
||||
it->second.firstAddress(IPAddress::IPv4).isUnicast() &&
|
||||
!it->second.isLoopback() &&
|
||||
!it->second.isPointToPoint())
|
||||
{
|
||||
return it->second;
|
||||
|
||||
+7
-7
@@ -40,28 +40,28 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
|
||||
const Poco::Net::SocketAddress& group() const;
|
||||
/// Returns the group address where the server listens.
|
||||
|
||||
|
||||
const Poco::Net::NetworkInterface& interfc() const;
|
||||
/// Returns the network interface for multicasting.
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
static Poco::Net::NetworkInterface findInterface();
|
||||
/// Finds an appropriate network interface for
|
||||
/// multicasting.
|
||||
|
||||
|
||||
private:
|
||||
Poco::Net::MulticastSocket _socket;
|
||||
Poco::Net::SocketAddress _group;
|
||||
Poco::Net::NetworkInterface _if;
|
||||
Poco::Thread _thread;
|
||||
Poco::Event _ready;
|
||||
bool _stop;
|
||||
std::atomic<bool> _stop;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ void MulticastSocketTest::testMulticast()
|
||||
{
|
||||
MulticastEchoServer echoServer;
|
||||
MulticastSocket ms(SocketAddress::IPv4);
|
||||
SocketAddress multicastAddress("234.2.2.2", 4040);
|
||||
ms.joinGroup(multicastAddress.host());
|
||||
ms.setReceiveTimeout(Poco::Timespan(5, 0));
|
||||
int n = ms.sendTo("hello", 5, echoServer.group());
|
||||
assertTrue (n == 5);
|
||||
@@ -58,6 +60,7 @@ void MulticastSocketTest::testMulticast()
|
||||
n = ms.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
ms.leaveGroup(multicastAddress.host());
|
||||
ms.close();
|
||||
}
|
||||
catch (Poco::NotImplementedException&)
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ void MultipartWriterTest::testWriteOnePart()
|
||||
w.nextPart(h);
|
||||
ostr << "this is part 1";
|
||||
w.close();
|
||||
std::string s = ostr.str();
|
||||
std::string s = ostr.str();
|
||||
assertTrue (s == "--MIME_boundary_01234567\r\nname1: value1\r\n\r\nthis is part 1\r\n--MIME_boundary_01234567--\r\n");
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void MultipartWriterTest::testWriteTwoParts()
|
||||
w.nextPart(h);
|
||||
ostr << "this is part 2";
|
||||
w.close();
|
||||
std::string s = ostr.str();
|
||||
std::string s = ostr.str();
|
||||
assertTrue (s == "--MIME_boundary_01234567\r\nname1: value1\r\n\r\nthis is part 1\r\n--MIME_boundary_01234567\r\n\r\nthis is part 2\r\n--MIME_boundary_01234567--\r\n");
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ using Poco::Delegate;
|
||||
using Poco::AutoPtr;
|
||||
|
||||
|
||||
NTPClientTest::NTPClientTest(const std::string& name):
|
||||
NTPClientTest::NTPClientTest(const std::string& name):
|
||||
CppUnit::TestCase(name),
|
||||
_ntpClient(IPAddress::IPv4)
|
||||
{
|
||||
@@ -75,8 +75,8 @@ void NTPClientTest::tearDown()
|
||||
void NTPClientTest::onResponse(const void* pSender, NTPEventArgs& args)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << std::endl << "Received from " << args.hostName() << " [" << args.hostAddress() << "] with "
|
||||
<< Poco::DateTimeFormatter::format(args.packet().referenceTime(), Poco::DateTimeFormat::ISO8601_FORMAT) << " reference typestamp"
|
||||
os << std::endl << "Received from " << args.hostName() << " [" << args.hostAddress() << "] with "
|
||||
<< Poco::DateTimeFormatter::format(args.packet().referenceTime(), Poco::DateTimeFormat::ISO8601_FORMAT) << " reference typestamp"
|
||||
<< std::endl;
|
||||
std::cout << os.str() << std::endl;
|
||||
}
|
||||
|
||||
+15
-15
@@ -32,21 +32,21 @@ NameValueCollectionTest::~NameValueCollectionTest()
|
||||
void NameValueCollectionTest::testNameValueCollection()
|
||||
{
|
||||
NameValueCollection nvc;
|
||||
|
||||
|
||||
assertTrue (nvc.empty());
|
||||
assertTrue (nvc.size() == 0);
|
||||
|
||||
|
||||
nvc.set("name", "value");
|
||||
assertTrue (!nvc.empty());
|
||||
assertTrue (nvc["name"] == "value");
|
||||
assertTrue (nvc["Name"] == "value");
|
||||
|
||||
|
||||
nvc.set("name2", "value2");
|
||||
assertTrue (nvc.get("name2") == "value2");
|
||||
assertTrue (nvc.get("NAME2") == "value2");
|
||||
|
||||
|
||||
assertTrue (nvc.size() == 2);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
std::string value = nvc.get("name3");
|
||||
@@ -64,19 +64,19 @@ void NameValueCollectionTest::testNameValueCollection()
|
||||
catch (NotFoundException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
assertTrue (nvc.get("name", "default") == "value");
|
||||
assertTrue (nvc.get("name3", "default") == "default");
|
||||
|
||||
assertTrue (nvc.has("name"));
|
||||
assertTrue (nvc.has("name2"));
|
||||
assertTrue (!nvc.has("name3"));
|
||||
|
||||
assertTrue (!nvc.has("name3"));
|
||||
|
||||
nvc.add("name3", "value3");
|
||||
assertTrue (nvc.get("name3") == "value3");
|
||||
|
||||
|
||||
nvc.add("name3", "value31");
|
||||
|
||||
|
||||
NameValueCollection::ConstIterator it = nvc.find("Name3");
|
||||
assertTrue (it != nvc.end());
|
||||
std::string v1 = it->second;
|
||||
@@ -85,23 +85,23 @@ void NameValueCollectionTest::testNameValueCollection()
|
||||
assertTrue (it != nvc.end());
|
||||
std::string v2 = it->second;
|
||||
assertTrue (it->first == "name3");
|
||||
|
||||
|
||||
assertTrue ((v1 == "value3" && v2 == "value31") || (v1 == "value31" && v2 == "value3"));
|
||||
|
||||
|
||||
nvc.erase("name3");
|
||||
assertTrue (!nvc.has("name3"));
|
||||
assertTrue (nvc.find("name3") == nvc.end());
|
||||
|
||||
|
||||
it = nvc.begin();
|
||||
assertTrue (it != nvc.end());
|
||||
++it;
|
||||
assertTrue (it != nvc.end());
|
||||
++it;
|
||||
assertTrue (it == nvc.end());
|
||||
|
||||
|
||||
nvc.clear();
|
||||
assertTrue (nvc.empty());
|
||||
|
||||
|
||||
assertTrue (nvc.size() == 0);
|
||||
}
|
||||
|
||||
|
||||
+41
-41
@@ -43,7 +43,7 @@ void OAuth10CredentialsTest::testCallback()
|
||||
//
|
||||
// POST /oauth/request_token HTTP/1.1
|
||||
// Host: api.twitter.com
|
||||
// Authorization:
|
||||
// Authorization:
|
||||
// OAuth oauth_callback="http%3A%2F%2Flocalhost%2Fsign-in-with-twitter%2F",
|
||||
// oauth_consumer_key="cChZNFj6T5R0TigYB9yd1w",
|
||||
// oauth_nonce="ea9ec8429b68d6b77cd5600adbbb0456",
|
||||
@@ -52,16 +52,16 @@ void OAuth10CredentialsTest::testCallback()
|
||||
// oauth_timestamp="1318467427",
|
||||
// oauth_version="1.0"
|
||||
|
||||
|
||||
|
||||
URI uri("https://api.twitter.com/oauth/request_token");
|
||||
OAuth10Credentials creds("cChZNFj6T5R0TigYB9yd1w", "L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg");
|
||||
creds.setCallback("http://localhost/sign-in-with-twitter/");
|
||||
creds.nonceAndTimestampForTesting("ea9ec8429b68d6b77cd5600adbbb0456", "1318467427");
|
||||
HTTPRequest request(HTTPRequest::HTTP_POST, uri.getPathEtc());
|
||||
|
||||
|
||||
creds.authenticate(request, uri);
|
||||
|
||||
std::string auth = request.get("Authorization");
|
||||
std::string auth = request.get("Authorization");
|
||||
assertTrue (auth == "OAuth"
|
||||
" oauth_consumer_key=\"cChZNFj6T5R0TigYB9yd1w\","
|
||||
" oauth_nonce=\"ea9ec8429b68d6b77cd5600adbbb0456\","
|
||||
@@ -77,38 +77,38 @@ void OAuth10CredentialsTest::testParams()
|
||||
{
|
||||
// Note: Request taken from <https://dev.twitter.com/oauth/overview/authorizing-requests>
|
||||
// and <https://dev.twitter.com/oauth/overview/creating-signatures>.
|
||||
//
|
||||
//
|
||||
// POST /1/statuses/update.json?include_entities=true HTTP/1.1
|
||||
// Content-Type: application/x-www-form-urlencoded
|
||||
// Authorization:
|
||||
// OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog",
|
||||
// oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
|
||||
// oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D",
|
||||
// oauth_signature_method="HMAC-SHA1",
|
||||
// oauth_timestamp="1318622958",
|
||||
// oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
// Authorization:
|
||||
// OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog",
|
||||
// oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
|
||||
// oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D",
|
||||
// oauth_signature_method="HMAC-SHA1",
|
||||
// oauth_timestamp="1318622958",
|
||||
// oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
// oauth_version="1.0"
|
||||
// Content-Length: 76
|
||||
// Host: api.twitter.com
|
||||
//
|
||||
//
|
||||
// status=Hello%20Ladies%20%2b%20Gentlemen%2c%20a%20signed%20OAuth%20request%21
|
||||
|
||||
URI uri("https://api.twitter.com/1/statuses/update.json?include_entities=true");
|
||||
OAuth10Credentials creds(
|
||||
"xvz1evFS4wEEPTGEFPHBog",
|
||||
"kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw",
|
||||
"370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
"xvz1evFS4wEEPTGEFPHBog",
|
||||
"kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw",
|
||||
"370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
"LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE"
|
||||
);
|
||||
creds.nonceAndTimestampForTesting("kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", "1318622958");
|
||||
HTTPRequest request(HTTPRequest::HTTP_POST, uri.getPathEtc());
|
||||
|
||||
|
||||
HTMLForm params;
|
||||
params.set("include_entities", "true");
|
||||
params.set("status", "Hello Ladies + Gentlemen, a signed OAuth request!");
|
||||
|
||||
|
||||
creds.authenticate(request, uri, params);
|
||||
|
||||
|
||||
std::string auth = request.get("Authorization");
|
||||
assertTrue (auth == "OAuth"
|
||||
" oauth_consumer_key=\"xvz1evFS4wEEPTGEFPHBog\","
|
||||
@@ -128,37 +128,37 @@ void OAuth10CredentialsTest::testRealm()
|
||||
//
|
||||
// POST /1/statuses/update.json?include_entities=true HTTP/1.1
|
||||
// Content-Type: application/x-www-form-urlencoded
|
||||
// Authorization:
|
||||
// Authorization:
|
||||
// OAuth realm="Twitter API"
|
||||
// oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog",
|
||||
// oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
|
||||
// oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D",
|
||||
// oauth_signature_method="HMAC-SHA1",
|
||||
// oauth_timestamp="1318622958",
|
||||
// oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
// oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog",
|
||||
// oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
|
||||
// oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D",
|
||||
// oauth_signature_method="HMAC-SHA1",
|
||||
// oauth_timestamp="1318622958",
|
||||
// oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
// oauth_version="1.0"
|
||||
// Content-Length: 76
|
||||
// Host: api.twitter.com
|
||||
//
|
||||
//
|
||||
// status=Hello%20Ladies%20%2b%20Gentlemen%2c%20a%20signed%20OAuth%20request%21
|
||||
|
||||
URI uri("https://api.twitter.com/1/statuses/update.json?include_entities=true");
|
||||
OAuth10Credentials creds(
|
||||
"xvz1evFS4wEEPTGEFPHBog",
|
||||
"kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw",
|
||||
"370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
"xvz1evFS4wEEPTGEFPHBog",
|
||||
"kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw",
|
||||
"370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
|
||||
"LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE"
|
||||
);
|
||||
creds.setRealm("Twitter API");
|
||||
creds.nonceAndTimestampForTesting("kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", "1318622958");
|
||||
HTTPRequest request(HTTPRequest::HTTP_POST, uri.getPathEtc());
|
||||
|
||||
|
||||
HTMLForm params;
|
||||
params.set("include_entities", "true");
|
||||
params.set("status", "Hello Ladies + Gentlemen, a signed OAuth request!");
|
||||
|
||||
|
||||
creds.authenticate(request, uri, params);
|
||||
|
||||
|
||||
std::string auth = request.get("Authorization");
|
||||
assertTrue (auth == "OAuth"
|
||||
" realm=\"Twitter API\","
|
||||
@@ -178,11 +178,11 @@ void OAuth10CredentialsTest::testPlaintext()
|
||||
OAuth10Credentials creds("consumerKey", "consumerSecret");
|
||||
creds.setCallback("http://localhost/sign-in-with-twitter/");
|
||||
HTTPRequest request(HTTPRequest::HTTP_POST, uri.getPathEtc());
|
||||
|
||||
|
||||
creds.authenticate(request, uri, OAuth10Credentials::SIGN_PLAINTEXT);
|
||||
|
||||
std::string auth = request.get("Authorization");
|
||||
|
||||
std::string auth = request.get("Authorization");
|
||||
|
||||
assertTrue (auth == "OAuth"
|
||||
" oauth_consumer_key=\"consumerKey\","
|
||||
" oauth_signature=\"consumerSecret%26\","
|
||||
@@ -204,17 +204,17 @@ void OAuth10CredentialsTest::testVerify()
|
||||
" oauth_timestamp=\"1318622958\","
|
||||
" oauth_token=\"370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb\","
|
||||
" oauth_version=\"1.0\"");
|
||||
|
||||
|
||||
OAuth10Credentials creds(request);
|
||||
assertTrue (creds.getConsumerKey() == "xvz1evFS4wEEPTGEFPHBog");
|
||||
assertTrue (creds.getToken() == "370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb");
|
||||
creds.setConsumerSecret("kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw");
|
||||
creds.setTokenSecret("LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE");
|
||||
|
||||
|
||||
HTMLForm params;
|
||||
params.read(uri.getRawQuery());
|
||||
params.read("status=Hello%20Ladies%20%2b%20Gentlemen%2c%20a%20signed%20OAuth%20request%21");
|
||||
|
||||
|
||||
assertTrue (creds.verify(request, uri, params));
|
||||
}
|
||||
|
||||
@@ -229,11 +229,11 @@ void OAuth10CredentialsTest::testVerifyPlaintext()
|
||||
" oauth_signature_method=\"PLAINTEXT\","
|
||||
" oauth_callback=\"http%3A%2F%2Flocalhost%2Fsign-in-with-twitter%2F\","
|
||||
" oauth_version=\"1.0\"");
|
||||
|
||||
|
||||
OAuth10Credentials creds(request);
|
||||
assertTrue (creds.getConsumerKey() == "consumerKey");
|
||||
creds.setConsumerSecret("consumerSecret");
|
||||
|
||||
|
||||
assertTrue (creds.verify(request, uri));
|
||||
assertTrue (creds.getCallback() == "http://localhost/sign-in-with-twitter/");
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void OAuth20CredentialsTest::testAuthorize()
|
||||
OAuth20Credentials creds("s3cr3tt0k3n");
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/");
|
||||
creds.authenticate(request);
|
||||
std::string auth = request.get("Authorization");
|
||||
std::string auth = request.get("Authorization");
|
||||
assertTrue (auth == "Bearer s3cr3tt0k3n");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void OAuth20CredentialsTest::testAuthorizeCustomScheme()
|
||||
OAuth20Credentials creds("s3cr3tt0k3n", "token");
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/");
|
||||
creds.authenticate(request);
|
||||
std::string auth = request.get("Authorization");
|
||||
std::string auth = request.get("Authorization");
|
||||
assertTrue (auth == "token s3cr3tt0k3n");
|
||||
}
|
||||
|
||||
|
||||
+261
-13
@@ -18,6 +18,7 @@
|
||||
#include "Poco/Net/NetException.h"
|
||||
#include "Poco/Net/PollSet.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::Net::Socket;
|
||||
@@ -31,6 +32,39 @@ using Poco::Stopwatch;
|
||||
using Poco::Thread;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class Poller : public Poco::Runnable
|
||||
{
|
||||
public:
|
||||
Poller(PollSet& pollSet, const Timespan& timeout): _pollSet(pollSet),
|
||||
_timeout(timeout),
|
||||
_running(false)
|
||||
{
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
_running = true;
|
||||
_pollSet.poll(_timeout);
|
||||
_running = false;
|
||||
}
|
||||
|
||||
bool isRunning()
|
||||
{
|
||||
return _running;
|
||||
}
|
||||
|
||||
private:
|
||||
PollSet& _pollSet;
|
||||
Timespan _timeout;
|
||||
std::atomic<bool> _running;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
PollSetTest::PollSetTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
@@ -41,6 +75,164 @@ PollSetTest::~PollSetTest()
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testAddUpdate()
|
||||
{
|
||||
EchoServer echoServer1;
|
||||
EchoServer echoServer2;
|
||||
StreamSocket ss1;
|
||||
StreamSocket ss2;
|
||||
|
||||
ss1.connect(SocketAddress("127.0.0.1", echoServer1.port()));
|
||||
ss2.connect(SocketAddress("127.0.0.1", echoServer2.port()));
|
||||
|
||||
PollSet ps;
|
||||
assertTrue(ps.empty());
|
||||
ps.add(ss1, PollSet::POLL_READ);
|
||||
assertTrue(!ps.empty());
|
||||
assertTrue(ps.has(ss1));
|
||||
assertTrue(!ps.has(ss2));
|
||||
|
||||
// nothing readable
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
Timespan timeout(1000000);
|
||||
assertTrue (ps.poll(timeout).empty());
|
||||
assertTrue (sw.elapsed() >= 900000);
|
||||
sw.restart();
|
||||
|
||||
ps.add(ss2, PollSet::POLL_READ);
|
||||
assertTrue(!ps.empty());
|
||||
assertTrue(ps.has(ss1));
|
||||
assertTrue(ps.has(ss2));
|
||||
|
||||
// ss1 must be writable, if polled for
|
||||
ps.add(ss1, PollSet::POLL_WRITE);
|
||||
PollSet::SocketModeMap sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) != sm.end());
|
||||
assertTrue (sm.find(ss2) == sm.end());
|
||||
assertTrue (sm.find(ss1)->second & PollSet::POLL_WRITE);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
ps.add(ss1, PollSet::POLL_READ);
|
||||
|
||||
ss1.setBlocking(true);
|
||||
ss1.sendBytes("hello", 5);
|
||||
while (!ss1.poll(Timespan(0, 10000), Socket::SELECT_READ))
|
||||
Poco::Thread::sleep(10);
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) != sm.end());
|
||||
assertTrue (sm.find(ss2) == sm.end());
|
||||
assertTrue (sm.find(ss1)->second & PollSet::POLL_READ);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
char buffer[256];
|
||||
int n = ss1.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
|
||||
ss2.setBlocking(true);
|
||||
ss2.sendBytes("HELLO", 5);
|
||||
sw.restart();
|
||||
ps.remove(ss1);
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) == sm.end());
|
||||
assertTrue (sm.find(ss2) != sm.end());
|
||||
assertTrue (sm.find(ss2)->second & PollSet::POLL_READ);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
n = ss2.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "HELLO");
|
||||
|
||||
ps.remove(ss2);
|
||||
assertTrue(ps.empty());
|
||||
assertTrue(!ps.has(ss1));
|
||||
assertTrue(!ps.has(ss2));
|
||||
|
||||
ss2.sendBytes("HELLO", 5);
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue (sm.empty());
|
||||
|
||||
n = ss2.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "HELLO");
|
||||
|
||||
ss1.close();
|
||||
ss2.close();
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testTimeout()
|
||||
{
|
||||
EchoServer echoServer;
|
||||
StreamSocket ss;
|
||||
ss.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
PollSet ps;
|
||||
ps.add(ss, PollSet::POLL_READ);
|
||||
Timespan timeout(1000000);
|
||||
Stopwatch sw; sw.start();
|
||||
PollSet::SocketModeMap sm = ps.poll(timeout);
|
||||
sw.stop();
|
||||
assertTrue(sm.empty());
|
||||
assertTrue(sw.elapsed() >= 900000);
|
||||
|
||||
ss.sendBytes("hello", 5);
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
sw.stop();
|
||||
assertTrue(ps.poll(timeout).size() == 1);
|
||||
|
||||
char buffer[5];
|
||||
ss.receiveBytes(buffer, sizeof(buffer));
|
||||
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
sw.stop();
|
||||
assertTrue(sm.empty());
|
||||
assertTrue(sw.elapsed() >= 900000);
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testPollNB()
|
||||
{
|
||||
EchoServer echoServer1;
|
||||
StreamSocket ss1;
|
||||
|
||||
ss1.connectNB(SocketAddress("127.0.0.1", echoServer1.port()));
|
||||
|
||||
PollSet ps;
|
||||
assertTrue(ps.empty());
|
||||
ps.add(ss1, PollSet::POLL_READ);
|
||||
ps.add(ss1, PollSet::POLL_WRITE);
|
||||
assertTrue(!ps.empty());
|
||||
assertTrue(ps.has(ss1));
|
||||
|
||||
while (!ss1.poll(Timespan(0, 10000), Socket::SELECT_WRITE))
|
||||
Poco::Thread::sleep(10);
|
||||
|
||||
Timespan timeout(1000000);
|
||||
PollSet::SocketModeMap sm;
|
||||
while (sm.empty()) sm = ps.poll(timeout);
|
||||
assertTrue(sm.find(ss1) != sm.end());
|
||||
assertTrue(sm.find(ss1)->second & PollSet::POLL_WRITE);
|
||||
|
||||
ss1.setBlocking(true);
|
||||
ss1.sendBytes("hello", 5);
|
||||
while (!ss1.poll(Timespan(0, 10000), Socket::SELECT_READ))
|
||||
Poco::Thread::sleep(10);
|
||||
char buffer[256];
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue(sm.find(ss1) != sm.end());
|
||||
assertTrue(sm.find(ss1)->second & PollSet::POLL_READ);
|
||||
|
||||
int n = ss1.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue(n == 5);
|
||||
assertTrue(std::string(buffer, n) == "hello");
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testPoll()
|
||||
{
|
||||
EchoServer echoServer1;
|
||||
@@ -76,31 +268,36 @@ void PollSetTest::testPoll()
|
||||
PollSet::SocketModeMap sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) != sm.end());
|
||||
assertTrue (sm.find(ss2) == sm.end());
|
||||
assertTrue (sm.find(ss1)->second == PollSet::POLL_WRITE);
|
||||
assertTrue (sm.find(ss1)->second | PollSet::POLL_WRITE);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
ps.update(ss1, PollSet::POLL_READ);
|
||||
|
||||
ss1.setBlocking(true);
|
||||
ss1.sendBytes("hello", 5);
|
||||
while (!ss1.poll(Timespan(0, 10000), Socket::SELECT_READ))
|
||||
Poco::Thread::sleep(10);
|
||||
char buffer[256];
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) != sm.end());
|
||||
assertTrue (sm.find(ss2) == sm.end());
|
||||
assertTrue (sm.find(ss1)->second == PollSet::POLL_READ);
|
||||
assertTrue (sm.find(ss1)->second & PollSet::POLL_READ);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
int n = ss1.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
|
||||
|
||||
ss2.setBlocking(true);
|
||||
ss2.sendBytes("HELLO", 5);
|
||||
while (!ss2.poll(Timespan(0, 10000), Socket::SELECT_READ))
|
||||
Poco::Thread::sleep(10);
|
||||
sw.restart();
|
||||
sm = ps.poll(timeout);
|
||||
assertTrue (sm.find(ss1) == sm.end());
|
||||
assertTrue (sm.find(ss2) != sm.end());
|
||||
assertTrue (sm.find(ss2)->second == PollSet::POLL_READ);
|
||||
assertTrue (sm.find(ss2)->second & PollSet::POLL_READ);
|
||||
assertTrue (sw.elapsed() < 1100000);
|
||||
|
||||
n = ss2.receiveBytes(buffer, sizeof(buffer));
|
||||
@@ -108,6 +305,7 @@ void PollSetTest::testPoll()
|
||||
assertTrue (std::string(buffer, n) == "HELLO");
|
||||
|
||||
ps.remove(ss2);
|
||||
ps.update(ss1, Socket::SELECT_READ);
|
||||
assertTrue(!ps.empty());
|
||||
assertTrue(ps.has(ss1));
|
||||
assertTrue(!ps.has(ss2));
|
||||
@@ -128,16 +326,14 @@ void PollSetTest::testPoll()
|
||||
|
||||
void PollSetTest::testPollNoServer()
|
||||
{
|
||||
#ifndef POCO_OS_FAMILY_WINDOWS
|
||||
StreamSocket ss1;
|
||||
StreamSocket ss2;
|
||||
|
||||
ss1.connectNB(SocketAddress("127.0.0.1", 0xFEFE));
|
||||
ss2.connectNB(SocketAddress("127.0.0.1", 0xFEFF));
|
||||
PollSet ps;
|
||||
assertTrue(ps.empty());
|
||||
ps.add(ss1, PollSet::POLL_READ);
|
||||
ps.add(ss2, PollSet::POLL_READ);
|
||||
ps.add(ss1, PollSet::POLL_READ | PollSet::POLL_WRITE | PollSet::POLL_ERROR);
|
||||
ps.add(ss2, PollSet::POLL_READ | PollSet::POLL_WRITE | PollSet::POLL_ERROR);
|
||||
assertTrue(!ps.empty());
|
||||
assertTrue(ps.has(ss1));
|
||||
assertTrue(ps.has(ss2));
|
||||
@@ -150,14 +346,12 @@ void PollSetTest::testPollNoServer()
|
||||
} while (sm.size() < 2);
|
||||
assertTrue(sm.size() == 2);
|
||||
for (auto s : sm)
|
||||
assertTrue(0 != (s.second | PollSet::POLL_ERROR));
|
||||
#endif // POCO_OS_FAMILY_WINDOWS
|
||||
assertTrue(0 != (s.second & PollSet::POLL_ERROR));
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testPollClosedServer()
|
||||
{
|
||||
#ifndef POCO_OS_FAMILY_WINDOWS
|
||||
EchoServer echoServer1;
|
||||
EchoServer echoServer2;
|
||||
StreamSocket ss1;
|
||||
@@ -165,7 +359,6 @@ void PollSetTest::testPollClosedServer()
|
||||
|
||||
ss1.connect(SocketAddress("127.0.0.1", echoServer1.port()));
|
||||
ss2.connect(SocketAddress("127.0.0.1", echoServer2.port()));
|
||||
|
||||
PollSet ps;
|
||||
assertTrue(ps.empty());
|
||||
ps.add(ss1, PollSet::POLL_READ);
|
||||
@@ -190,7 +383,57 @@ void PollSetTest::testPollClosedServer()
|
||||
assertTrue(sm.size() == 2);
|
||||
assertTrue(0 == ss1.receiveBytes(0, 0));
|
||||
assertTrue(0 == ss2.receiveBytes(0, 0));
|
||||
#endif // POCO_OS_FAMILY_WINDOWS
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testPollSetWakeUp()
|
||||
{
|
||||
#if defined(POCO_HAVE_FD_EPOLL) || defined (POCO_HAVE_FD_POLL)
|
||||
PollSet ps;
|
||||
Timespan timeout(100000000); // 100 seconds
|
||||
Poller poller(ps, timeout);
|
||||
Thread t;
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
t.start(poller);
|
||||
while (!poller.isRunning()) Thread::sleep(100);
|
||||
ps.wakeUp();
|
||||
t.join();
|
||||
sw.stop();
|
||||
assertFalse (poller.isRunning());
|
||||
assertTrue(sw.elapsedSeconds() < 1);
|
||||
#else // TODO: other implementations
|
||||
std::cout << "not implemented";
|
||||
#endif // POCO_HAVE_FD_EPOLL || POCO_HAVE_FD_EPOLL
|
||||
}
|
||||
|
||||
|
||||
void PollSetTest::testClear()
|
||||
{
|
||||
EchoServer echoServer;
|
||||
StreamSocket ss;
|
||||
ss.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
PollSet ps;
|
||||
|
||||
ps.add(ss, PollSet::POLL_READ);
|
||||
PollSet::SocketModeMap sm = ps.poll(0);
|
||||
assertTrue(sm.empty());
|
||||
|
||||
ss.sendBytes("hello", 5);
|
||||
assertTrue(ps.poll(100000).size() == 1);
|
||||
|
||||
char buffer[5];
|
||||
ss.receiveBytes(buffer, sizeof(buffer));
|
||||
|
||||
ps.clear();
|
||||
ps.add(ss, PollSet::POLL_READ);
|
||||
sm = ps.poll(0);
|
||||
assertTrue(sm.empty());
|
||||
|
||||
ss.sendBytes(buffer, 5);
|
||||
assertTrue(ps.poll(100000).size() == 1);
|
||||
|
||||
ss.receiveBytes(buffer, sizeof(buffer));
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +451,14 @@ CppUnit::Test* PollSetTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("PollSetTest");
|
||||
|
||||
CppUnit_addTest(pSuite, PollSetTest, testAddUpdate);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testTimeout);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testPollNB);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testPoll);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testPollNoServer);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testPollClosedServer);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testPollSetWakeUp);
|
||||
CppUnit_addTest(pSuite, PollSetTest, testClear);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
+5
@@ -24,9 +24,14 @@ public:
|
||||
PollSetTest(const std::string& name);
|
||||
~PollSetTest();
|
||||
|
||||
void testAddUpdate();
|
||||
void testTimeout();
|
||||
void testPollNB();
|
||||
void testPoll();
|
||||
void testPollNoServer();
|
||||
void testPollClosedServer();
|
||||
void testPollSetWakeUp();
|
||||
void testClear();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ void QuotedPrintableTest::testEncode()
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
QuotedPrintableEncoder encoder(ostr);
|
||||
|
||||
|
||||
encoder <<
|
||||
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\r\n"
|
||||
"Proin id odio sit amet metus dignissim porttitor. \r\n"
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
void testEncode();
|
||||
void testDecode();
|
||||
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
||||
+31
-2
@@ -60,14 +60,14 @@ void RawSocketTest::testEchoIPv4()
|
||||
assertTrue (5 == (n - shift));
|
||||
assertTrue ("hello" == std::string((char*)ptr, 5));
|
||||
|
||||
rs.close();
|
||||
rs.close();
|
||||
}
|
||||
|
||||
|
||||
void RawSocketTest::testSendToReceiveFromIPv4()
|
||||
{
|
||||
RawSocket rs(IPAddress::IPv4);
|
||||
|
||||
|
||||
int n = rs.sendTo("hello", 5, SocketAddress("127.0.0.1", 0));
|
||||
assertTrue (n == 5);
|
||||
|
||||
@@ -84,6 +84,34 @@ void RawSocketTest::testSendToReceiveFromIPv4()
|
||||
}
|
||||
|
||||
|
||||
void RawSocketTest::testEchoIPv4Move()
|
||||
{
|
||||
SocketAddress sa("127.0.0.1", 0);
|
||||
RawSocket rs0 = RawSocket(IPAddress::IPv4);
|
||||
rs0.connect(sa);
|
||||
|
||||
RawSocket rs(std::move(rs0));
|
||||
#ifdef POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue (rs0.impl() == nullptr);
|
||||
#endif // POCO_NEW_STATE_ON_MOVE
|
||||
|
||||
int n = rs.sendBytes("hello", 5);
|
||||
assertTrue (5 == n);
|
||||
|
||||
char buffer[256] = "";
|
||||
unsigned char* ptr = (unsigned char*) buffer;
|
||||
|
||||
n = rs.receiveBytes(buffer, sizeof(buffer));
|
||||
int shift = ((buffer[0] & 0x0F) * 4);
|
||||
ptr += shift;
|
||||
|
||||
assertTrue (5 == (n - shift));
|
||||
assertTrue ("hello" == std::string((char*)ptr, 5));
|
||||
|
||||
rs.close();
|
||||
}
|
||||
|
||||
|
||||
void RawSocketTest::setUp()
|
||||
{
|
||||
}
|
||||
@@ -100,6 +128,7 @@ CppUnit::Test* RawSocketTest::suite()
|
||||
|
||||
CppUnit_addTest(pSuite, RawSocketTest, testEchoIPv4);
|
||||
CppUnit_addTest(pSuite, RawSocketTest, testSendToReceiveFromIPv4);
|
||||
CppUnit_addTest(pSuite, RawSocketTest, testEchoIPv4Move);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
|
||||
void testEchoIPv4();
|
||||
void testSendToReceiveFromIPv4();
|
||||
void testEchoIPv4Move();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "ReactorTestSuite.h"
|
||||
#include "SocketReactorTest.h"
|
||||
#include "SocketConnectorTest.h"
|
||||
|
||||
|
||||
CppUnit::Test* ReactorTestSuite::suite()
|
||||
@@ -17,6 +18,7 @@ CppUnit::Test* ReactorTestSuite::suite()
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ReactorTestSuite");
|
||||
|
||||
pSuite->addTest(SocketReactorTest::suite());
|
||||
pSuite->addTest(SocketConnectorTest::suite());
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ void SMTPClientSessionTest::testSendFailed()
|
||||
catch (SMTPException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
session.close();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public:
|
||||
void testSendMultiRecipient();
|
||||
void testMultiSeparateRecipient();
|
||||
void testSendFailed();
|
||||
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
||||
+19
-7
@@ -13,6 +13,7 @@
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Net/NetException.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::Net::SocketAddress;
|
||||
@@ -41,19 +42,22 @@ void SocketAddressTest::testSocketAddress()
|
||||
assertTrue (wild.host().isWildcard());
|
||||
assertTrue (wild.port() == 0);
|
||||
|
||||
SocketAddress sa1("192.168.1.100", 100);
|
||||
SocketAddress sa01 = SocketAddress("192.168.1.100", 100);
|
||||
SocketAddress sa1(std::move(sa01));
|
||||
assertTrue (sa1.af() == AF_INET);
|
||||
assertTrue (sa1.family() == SocketAddress::IPv4);
|
||||
assertTrue (sa1.host().toString() == "192.168.1.100");
|
||||
assertTrue (sa1.port() == 100);
|
||||
assertTrue (sa1.toString() == "192.168.1.100:100");
|
||||
|
||||
SocketAddress sa2("192.168.1.100", "100");
|
||||
SocketAddress sa02 = SocketAddress("192.168.1.100", "100");
|
||||
SocketAddress sa2(std::move(sa02));
|
||||
assertTrue (sa2.host().toString() == "192.168.1.100");
|
||||
assertTrue (sa2.port() == 100);
|
||||
|
||||
#if !defined(_WIN32_WCE)
|
||||
SocketAddress sa3("192.168.1.100", "ftp");
|
||||
SocketAddress sa03 = SocketAddress("192.168.1.100", "ftp");
|
||||
SocketAddress sa3(std::move(sa03));
|
||||
assertTrue (sa3.host().toString() == "192.168.1.100");
|
||||
assertTrue (sa3.port() == 21);
|
||||
#endif
|
||||
@@ -67,7 +71,8 @@ void SocketAddressTest::testSocketAddress()
|
||||
{
|
||||
}
|
||||
|
||||
SocketAddress sa4("pocoproject.org", 80);
|
||||
SocketAddress sa04 = SocketAddress("pocoproject.org", 80);
|
||||
SocketAddress sa4(std::move(sa04));
|
||||
assertTrue (sa4.host().toString() == "54.93.62.90");
|
||||
assertTrue (sa4.port() == 80);
|
||||
|
||||
@@ -92,11 +97,13 @@ void SocketAddressTest::testSocketAddress()
|
||||
{
|
||||
}
|
||||
|
||||
SocketAddress sa7("192.168.2.120:88");
|
||||
SocketAddress sa07 = SocketAddress("192.168.2.120:88");
|
||||
SocketAddress sa7(std::move(sa07));
|
||||
assertTrue (sa7.host().toString() == "192.168.2.120");
|
||||
assertTrue (sa7.port() == 88);
|
||||
|
||||
SocketAddress sa8("[192.168.2.120]:88");
|
||||
SocketAddress sa08 = SocketAddress("[192.168.2.120]:88");
|
||||
SocketAddress sa8(std::move(sa08));
|
||||
assertTrue (sa8.host().toString() == "192.168.2.120");
|
||||
assertTrue (sa8.port() == 88);
|
||||
|
||||
@@ -121,7 +128,8 @@ void SocketAddressTest::testSocketAddress()
|
||||
SocketAddress sa10("www6.pocoproject.org", 80);
|
||||
assertTrue (sa10.host().toString() == "54.93.62.90" || sa10.host().toString() == "2001:4801:7828:101:be76:4eff:fe10:1455");
|
||||
|
||||
SocketAddress sa11(SocketAddress::IPv4, "www6.pocoproject.org", 80);
|
||||
SocketAddress sa011 = SocketAddress(SocketAddress::IPv4, "www6.pocoproject.org", 80);
|
||||
SocketAddress sa11(std::move(sa011));
|
||||
assertTrue (sa11.host().toString() == "54.93.62.90");
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
@@ -168,6 +176,8 @@ void SocketAddressTest::testSocketAddress6()
|
||||
assertTrue (sa2.host().toString() == "fe80::e6ce:8fff:fe4a:edd0");
|
||||
assertTrue (sa2.port() == 100);
|
||||
assertTrue (sa2.toString() == "[fe80::e6ce:8fff:fe4a:edd0]:100");
|
||||
#else
|
||||
std::cout << "[IPv6 DISABLED]" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -191,6 +201,8 @@ void SocketAddressTest::testSocketAddressUnixLocal()
|
||||
SocketAddress sa4("/tmp/sock1");
|
||||
assertTrue (sa1 == sa4);
|
||||
assertTrue (sa4.toString() == "/tmp/sock1");
|
||||
#else
|
||||
std::cout << "[UNIX LOCAL DISABLED]" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
//
|
||||
// SocketConnectorTest.cpp
|
||||
//
|
||||
// Copyright (c) 2005-2019, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "SocketConnectorTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/SocketReactor.h"
|
||||
#include "Poco/Net/SocketNotification.h"
|
||||
#include "Poco/Net/SocketConnector.h"
|
||||
#include "Poco/Net/SocketAcceptor.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Observer.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::Net::SocketReactor;
|
||||
using Poco::Net::SocketConnector;
|
||||
using Poco::Net::SocketAcceptor;
|
||||
using Poco::Net::StreamSocket;
|
||||
using Poco::Net::ServerSocket;
|
||||
using Poco::Net::SocketAddress;
|
||||
using Poco::Net::SocketNotification;
|
||||
using Poco::Net::ReadableNotification;
|
||||
using Poco::Net::WritableNotification;
|
||||
using Poco::Net::TimeoutNotification;
|
||||
using Poco::Net::ShutdownNotification;
|
||||
using Poco::Observer;
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
class EchoServiceHandler
|
||||
{
|
||||
public:
|
||||
EchoServiceHandler(StreamSocket& socket, SocketReactor& reactor):
|
||||
_socket(socket),
|
||||
_reactor(reactor)
|
||||
{
|
||||
_reactor.addEventHandler(_socket, Observer<EchoServiceHandler, ReadableNotification>(*this, &EchoServiceHandler::onReadable));
|
||||
}
|
||||
|
||||
~EchoServiceHandler()
|
||||
{
|
||||
_reactor.removeEventHandler(_socket, Observer<EchoServiceHandler, ReadableNotification>(*this, &EchoServiceHandler::onReadable));
|
||||
}
|
||||
|
||||
void onReadable(ReadableNotification* pNf)
|
||||
{
|
||||
pNf->release();
|
||||
char buffer[8];
|
||||
int n = _socket.receiveBytes(buffer, sizeof(buffer));
|
||||
if (n > 0) _socket.sendBytes(buffer, n);
|
||||
else delete this;
|
||||
}
|
||||
|
||||
private:
|
||||
StreamSocket _socket;
|
||||
SocketReactor& _reactor;
|
||||
};
|
||||
|
||||
class ClientServiceHandler
|
||||
{
|
||||
public:
|
||||
ClientServiceHandler(StreamSocket& socket, SocketReactor& reactor):
|
||||
_socket(socket),
|
||||
_reactor(reactor),
|
||||
_or(*this, &ClientServiceHandler::onReadable),
|
||||
_ow(*this, &ClientServiceHandler::onWritable),
|
||||
_os(*this, &ClientServiceHandler::onShutdown)
|
||||
{
|
||||
_reactor.addEventHandler(_socket, _or);
|
||||
_reactor.addEventHandler(_socket, _ow);
|
||||
_reactor.addEventHandler(_socket, _os);
|
||||
|
||||
doSomething();
|
||||
}
|
||||
|
||||
~ClientServiceHandler()
|
||||
{
|
||||
_reactor.removeEventHandler(_socket, _os);
|
||||
_reactor.removeEventHandler(_socket, _ow);
|
||||
_reactor.removeEventHandler(_socket, _or);
|
||||
}
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
Thread::sleep(100);
|
||||
}
|
||||
|
||||
void onShutdown(ShutdownNotification* pNf)
|
||||
{
|
||||
if (pNf) pNf->release();
|
||||
_reactor.removeEventHandler(_socket, _os);
|
||||
delete this;
|
||||
}
|
||||
|
||||
void onReadable(ReadableNotification* pNf)
|
||||
{
|
||||
if (pNf) pNf->release();
|
||||
char buffer[32];
|
||||
int n = _socket.receiveBytes(buffer, sizeof(buffer));
|
||||
if (n <= 0) onShutdown(0);
|
||||
}
|
||||
|
||||
void onWritable(WritableNotification* pNf)
|
||||
{
|
||||
if (pNf) pNf->release();
|
||||
_reactor.removeEventHandler(_socket, _ow);
|
||||
std::string data(5, 'x');
|
||||
_socket.sendBytes(data.data(), (int) data.length());
|
||||
_socket.shutdownSend();
|
||||
}
|
||||
|
||||
StreamSocket _socket;
|
||||
SocketReactor& _reactor;
|
||||
Observer<ClientServiceHandler, ReadableNotification> _or;
|
||||
Observer<ClientServiceHandler, WritableNotification> _ow;
|
||||
Observer<ClientServiceHandler, ShutdownNotification> _os;
|
||||
};
|
||||
}
|
||||
|
||||
SocketConnectorTest::SocketConnectorTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SocketConnectorTest::~SocketConnectorTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SocketConnectorTest::testUnregisterConnector()
|
||||
{
|
||||
SocketAddress ssa;
|
||||
ServerSocket ss(ssa);
|
||||
SocketReactor reactor1;
|
||||
SocketReactor reactor2;
|
||||
SocketAcceptor<EchoServiceHandler> acceptor(ss, reactor1);
|
||||
Poco::Thread th;
|
||||
th.start(reactor1);
|
||||
SocketAddress sa("127.0.0.1", ss.address().port());
|
||||
SocketConnector<ClientServiceHandler> connector(sa, reactor2);
|
||||
Poco::Thread th2;
|
||||
th2.start(reactor2);
|
||||
Thread::sleep(200);
|
||||
reactor1.stop();
|
||||
reactor2.stop();
|
||||
th.join();
|
||||
th2.join();
|
||||
}
|
||||
|
||||
|
||||
void SocketConnectorTest::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SocketConnectorTest::tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* SocketConnectorTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SocketConnectorTest");
|
||||
|
||||
CppUnit_addTest(pSuite, SocketConnectorTest, testUnregisterConnector);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// SocketConnectorTest.h
|
||||
//
|
||||
// Definition of the SocketConnectorTest class.
|
||||
//
|
||||
// Copyright (c) 2005-2019, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SocketConnectorTest_INCLUDED
|
||||
#define SocketConnectorTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
|
||||
|
||||
class SocketConnectorTest: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
SocketConnectorTest(const std::string& name);
|
||||
~SocketConnectorTest();
|
||||
|
||||
void testUnregisterConnector();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
};
|
||||
|
||||
|
||||
#endif // SocketConnectorTest_INCLUDED
|
||||
@@ -0,0 +1,355 @@
|
||||
//
|
||||
// SocketProactorTest.cpp
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "SocketProactorTest.h"
|
||||
#include "UDPEchoServer.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Net/DatagramSocket.h"
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
#include <iostream>
|
||||
|
||||
using Poco::Net::SocketProactor;
|
||||
using Poco::Net::StreamSocket;
|
||||
using Poco::Net::DatagramSocket;
|
||||
using Poco::Net::ServerSocket;
|
||||
using Poco::Net::SocketAddress;
|
||||
using Poco::Thread;
|
||||
using Poco::Timestamp;
|
||||
using Poco::Stopwatch;
|
||||
|
||||
|
||||
SocketProactorTest::SocketProactorTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SocketProactorTest::~SocketProactorTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::testTCPSocketProactor()
|
||||
{
|
||||
EchoServer echoServer;
|
||||
SocketProactor proactor(false);
|
||||
StreamSocket s;
|
||||
s.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
int mode = SocketProactor::POLL_READ | SocketProactor::POLL_WRITE | SocketProactor::POLL_ERROR;
|
||||
proactor.addSocket(s, mode);
|
||||
std::string hello = "hello proactor world";
|
||||
bool sent = false, sendPassed = false;
|
||||
auto onSendCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
sendPassed = (err.value() == 0) && (bytes == hello.length());
|
||||
sent = true;
|
||||
};
|
||||
proactor.addSend(s, SocketProactor::Buffer(hello.begin(), hello.end()), onSendCompletion);
|
||||
SocketProactor::Buffer buf(hello.size(), 0);
|
||||
std::atomic<bool> received(false), receivePassed(false);
|
||||
auto onRecvCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
receivePassed = (err.value() == 0) &&
|
||||
(bytes == hello.length()) &&
|
||||
(std::string(buf.begin(), buf.end()) == hello);
|
||||
received = true;
|
||||
};
|
||||
proactor.addReceive(s, buf, onRecvCompletion);
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
while (!received)
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receive completion timed out.", __LINE__, __FILE__);
|
||||
proactor.poll();
|
||||
}
|
||||
|
||||
assertTrue (sent);
|
||||
assertTrue (sendPassed);
|
||||
assertTrue (received);
|
||||
assertTrue (receivePassed);
|
||||
|
||||
buf.clear();
|
||||
buf.resize(hello.size());
|
||||
assertFalse(std::string(buf.begin(), buf.end()) == hello);
|
||||
|
||||
sent = false;
|
||||
sendPassed = false;
|
||||
received = false;
|
||||
receivePassed = false;
|
||||
|
||||
proactor.addSend(s, SocketProactor::Buffer(hello.begin(), hello.end()), nullptr);
|
||||
proactor.addReceive(s, buf, nullptr);
|
||||
int handled = 0, handledTot = 0;
|
||||
sw.restart();
|
||||
do
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receive completion timed out.", __LINE__, __FILE__);
|
||||
proactor.poll(&handled);
|
||||
handledTot += handled;
|
||||
}
|
||||
while (handledTot < 2);
|
||||
|
||||
assertTrue(std::string(buf.begin(), buf.end()) == hello);
|
||||
assertFalse (sent);
|
||||
assertFalse (sendPassed);
|
||||
assertFalse (received);
|
||||
assertFalse (receivePassed);
|
||||
|
||||
std::atomic<bool> error(false);
|
||||
std::atomic<bool> errorPassed(false);
|
||||
auto onError = [&](std::error_code err, int bytes)
|
||||
{
|
||||
errorPassed = (err.value() != 0) && (bytes == 0);
|
||||
error = true;
|
||||
};
|
||||
|
||||
StreamSocket errSock(SocketAddress::IPv4);
|
||||
errSock.connectNB(SocketAddress("127.0.0.1", 0xFFEE));
|
||||
proactor.addSend(errSock, SocketProactor::Buffer(hello.begin(), hello.end()), onError);
|
||||
Thread::sleep(100);
|
||||
sw.restart();
|
||||
while (!error)
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor send completion timed out.", __LINE__, __FILE__);
|
||||
proactor.poll();
|
||||
}
|
||||
assertTrue (error);
|
||||
assertTrue(errorPassed);
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::testUDPSocketProactor()
|
||||
{
|
||||
UDPEchoServer echoServer;
|
||||
DatagramSocket s(SocketAddress::IPv4);
|
||||
SocketProactor proactor(false);
|
||||
int mode = SocketProactor::POLL_READ | SocketProactor::POLL_WRITE;
|
||||
proactor.addSocket(s, mode);
|
||||
std::string hello = "hello proactor world";
|
||||
bool sent = false, sendPassed = false;
|
||||
auto onSendCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
sendPassed = (err.value() == 0) &&
|
||||
(bytes == hello.length());
|
||||
sent = true;
|
||||
};
|
||||
proactor.addSendTo(s,
|
||||
SocketProactor::Buffer(hello.begin(), hello.end()),
|
||||
SocketAddress("127.0.0.1", echoServer.port()),
|
||||
onSendCompletion);
|
||||
Poco::Net::SocketProactor::Buffer buf(hello.size(), 0);
|
||||
std::atomic<bool> received(false), receivePassed(false);
|
||||
SocketAddress sa;
|
||||
auto onRecvCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
receivePassed = (err.value() == 0) &&
|
||||
(bytes == hello.length()) &&
|
||||
(sa.host().toString() == "127.0.0.1") &&
|
||||
(sa.port() == echoServer.port()) &&
|
||||
(std::string(buf.begin(), buf.end()) == hello);
|
||||
received = true;
|
||||
};
|
||||
proactor.addReceiveFrom(s, buf, sa, onRecvCompletion);
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
while (!received)
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receive completion timed out.", __LINE__, __FILE__);
|
||||
proactor.poll();
|
||||
}
|
||||
|
||||
assertTrue (sent);
|
||||
assertTrue (sendPassed);
|
||||
assertTrue (received);
|
||||
assertTrue (receivePassed);
|
||||
|
||||
buf.clear();
|
||||
buf.resize(hello.size());
|
||||
assertFalse(std::string(buf.begin(), buf.end()) == hello);
|
||||
|
||||
sent = false;
|
||||
sendPassed = false;
|
||||
received = false;
|
||||
receivePassed = false;
|
||||
|
||||
proactor.addSendTo(s,
|
||||
SocketProactor::Buffer(hello.begin(), hello.end()),
|
||||
SocketAddress("127.0.0.1", echoServer.port()),
|
||||
nullptr);
|
||||
proactor.addReceiveFrom(s, buf, sa, nullptr);
|
||||
int handled = 0, handledTot = 0;
|
||||
sw.restart();
|
||||
do
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receiveFrom timed out.", __LINE__, __FILE__);
|
||||
proactor.poll(&handled);
|
||||
handledTot += handled;
|
||||
} while (handledTot < 2);
|
||||
|
||||
assertTrue(std::string(buf.begin(), buf.end()) == hello);
|
||||
assertFalse (sent);
|
||||
assertFalse (sendPassed);
|
||||
assertFalse (received);
|
||||
assertFalse (receivePassed);
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::testSocketProactorStartStop()
|
||||
{
|
||||
UDPEchoServer echoServer;
|
||||
DatagramSocket s(SocketAddress::IPv4);
|
||||
SocketProactor proactor(false);
|
||||
int mode = SocketProactor::POLL_READ | SocketProactor::POLL_WRITE;
|
||||
proactor.addSocket(s, mode);
|
||||
std::string hello = "hello proactor world";
|
||||
bool sent = false, sendPassed = false;
|
||||
auto onSendCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
sendPassed = (err.value() == 0) &&
|
||||
(bytes == hello.length());
|
||||
sent = true;
|
||||
};
|
||||
proactor.addSendTo(s,
|
||||
SocketProactor::Buffer(hello.begin(), hello.end()),
|
||||
SocketAddress("127.0.0.1", echoServer.port()),
|
||||
onSendCompletion);
|
||||
Poco::Net::SocketProactor::Buffer buf(hello.size(), 0);
|
||||
std::atomic<bool> received(false), receivePassed(false);
|
||||
SocketAddress sa;
|
||||
auto onRecvCompletion = [&](std::error_code err, int bytes)
|
||||
{
|
||||
receivePassed = (err.value() == 0) &&
|
||||
(bytes == hello.length()) &&
|
||||
(sa.host().toString() == "127.0.0.1") &&
|
||||
(sa.port() == echoServer.port()) &&
|
||||
(std::string(buf.begin(), buf.end()) == hello);
|
||||
received = true;
|
||||
proactor.stop();
|
||||
};
|
||||
proactor.addReceiveFrom(s, buf, sa, onRecvCompletion);
|
||||
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
while (!received)
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receiveFrom timed out.", __LINE__, __FILE__);
|
||||
proactor.poll();
|
||||
}
|
||||
|
||||
assertTrue (sent);
|
||||
assertTrue (sendPassed);
|
||||
assertTrue (received);
|
||||
assertTrue (receivePassed);
|
||||
|
||||
buf.clear();
|
||||
buf.resize(hello.size());
|
||||
assertFalse(std::string(buf.begin(), buf.end()) == hello);
|
||||
|
||||
sent = false;
|
||||
sendPassed = false;
|
||||
received = false;
|
||||
receivePassed = false;
|
||||
|
||||
assertFalse (sent);
|
||||
assertFalse (sendPassed);
|
||||
assertFalse (received);
|
||||
assertFalse (receivePassed);
|
||||
|
||||
proactor.addSendTo(s,
|
||||
SocketProactor::Buffer(hello.begin(), hello.end()),
|
||||
SocketAddress("127.0.0.1", echoServer.port()),
|
||||
onSendCompletion);
|
||||
proactor.addReceiveFrom(s, buf, sa, onRecvCompletion);
|
||||
sw.restart();
|
||||
while (!received)
|
||||
{
|
||||
if (sw.elapsedSeconds() > 1)
|
||||
fail("SocketProactor receiveFrom timed out.", __LINE__, __FILE__);
|
||||
proactor.poll();
|
||||
}
|
||||
|
||||
assertTrue(std::string(buf.begin(), buf.end()) == hello);
|
||||
assertTrue (sent);
|
||||
assertTrue (sendPassed);
|
||||
assertTrue (received);
|
||||
assertTrue (receivePassed);
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::testWork()
|
||||
{
|
||||
SocketProactor proactor;
|
||||
int executed = 0;
|
||||
SocketProactor::Work work = [&]() { ++executed; };
|
||||
proactor.addWork(work);
|
||||
assertTrue (proactor.runOne() == 1);
|
||||
assertEquals (executed, 1);
|
||||
assertTrue (proactor.poll() == 0);
|
||||
assertEquals (executed, 1);
|
||||
|
||||
UDPEchoServer echoServer;
|
||||
DatagramSocket s(SocketAddress::IPv4);
|
||||
int mode = SocketProactor::POLL_READ | SocketProactor::POLL_WRITE;
|
||||
proactor.addSocket(s, mode);
|
||||
proactor.addSendTo(s,
|
||||
SocketProactor::Buffer(1, 0),
|
||||
SocketAddress("127.0.0.1", echoServer.port()),
|
||||
nullptr);
|
||||
assertTrue (proactor.poll() == 1);
|
||||
assertEquals (executed, 2);
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::testTimedWork()
|
||||
{
|
||||
SocketProactor proactor;
|
||||
int executed = 0;
|
||||
SocketProactor::Work work = [&]() { ++executed; };
|
||||
proactor.addWork(work, 0);
|
||||
proactor.addWork(work, 1000);
|
||||
assertTrue (proactor.poll() == 1);
|
||||
assertEquals (executed, 1);
|
||||
Thread::sleep(1000);
|
||||
assertTrue (proactor.poll() == 1);
|
||||
assertEquals (executed, 2);
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SocketProactorTest::tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* SocketProactorTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SocketProactorTest");
|
||||
|
||||
CppUnit_addTest(pSuite, SocketProactorTest, testTCPSocketProactor);
|
||||
CppUnit_addTest(pSuite, SocketProactorTest, testUDPSocketProactor);
|
||||
CppUnit_addTest(pSuite, SocketProactorTest, testSocketProactorStartStop);
|
||||
CppUnit_addTest(pSuite, SocketProactorTest, testWork);
|
||||
CppUnit_addTest(pSuite, SocketProactorTest, testTimedWork);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// SocketProactorTest.h
|
||||
//
|
||||
// Definition of the SocketProactorTest class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SocketProactorTest_INCLUDED
|
||||
#define SocketProactorTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Thread.h"
|
||||
#include "Poco/Observer.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Net/SocketProactor.h"
|
||||
#include "Poco/Net/SocketNotification.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
#include "EchoServer.h"
|
||||
|
||||
|
||||
class SocketProactorTest: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
SocketProactorTest(const std::string& name);
|
||||
~SocketProactorTest();
|
||||
|
||||
void testTCPSocketProactor();
|
||||
void testUDPSocketProactor();
|
||||
void testSocketProactorStartStop();
|
||||
|
||||
void testWork();
|
||||
void testTimedWork();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
#endif // SocketProactorTest_INCLUDED
|
||||
+74
-22
@@ -20,6 +20,7 @@
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Observer.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Thread.h"
|
||||
#include <sstream>
|
||||
@@ -36,14 +37,20 @@ using Poco::Net::SocketNotification;
|
||||
using Poco::Net::ReadableNotification;
|
||||
using Poco::Net::WritableNotification;
|
||||
using Poco::Net::TimeoutNotification;
|
||||
using Poco::Net::ErrorNotification;
|
||||
using Poco::Net::ShutdownNotification;
|
||||
using Poco::Observer;
|
||||
using Poco::Stopwatch;
|
||||
using Poco::IllegalStateException;
|
||||
using Poco::Thread;
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
int DATA_SIZE = 1024;
|
||||
int REACTORS_COUNT = 8;
|
||||
int MAX_DATA_SIZE = DATA_SIZE * REACTORS_COUNT;
|
||||
|
||||
class EchoServiceHandler
|
||||
{
|
||||
public:
|
||||
@@ -130,12 +137,18 @@ namespace
|
||||
checkReadableObserverCount(1);
|
||||
_reactor.removeEventHandler(_socket, Observer<ClientServiceHandler, ReadableNotification>(*this, &ClientServiceHandler::onReadable));
|
||||
checkReadableObserverCount(0);
|
||||
if (_once || _data.size() == 8192)
|
||||
if (_once)
|
||||
{
|
||||
_reactor.stop();
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_data.size() == MAX_DATA_SIZE)
|
||||
{
|
||||
_reactor.stop();
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
void onWritable(WritableNotification* pNf)
|
||||
@@ -144,7 +157,7 @@ namespace
|
||||
checkWritableObserverCount(1);
|
||||
_reactor.removeEventHandler(_socket, Observer<ClientServiceHandler, WritableNotification>(*this, &ClientServiceHandler::onWritable));
|
||||
checkWritableObserverCount(0);
|
||||
std::string data(1024, 'x');
|
||||
std::string data(DATA_SIZE, 'x');
|
||||
_socket.sendBytes(data.data(), (int) data.length());
|
||||
_socket.shutdownSend();
|
||||
}
|
||||
@@ -255,7 +268,6 @@ namespace
|
||||
static bool _once;
|
||||
};
|
||||
|
||||
|
||||
std::string ClientServiceHandler::_data;
|
||||
bool ClientServiceHandler::_readableError = false;
|
||||
bool ClientServiceHandler::_writableError = false;
|
||||
@@ -290,12 +302,6 @@ namespace
|
||||
reactor()->stop();
|
||||
}
|
||||
|
||||
void onError(int error)
|
||||
{
|
||||
_failed = true;
|
||||
reactor()->stop();
|
||||
}
|
||||
|
||||
bool failed() const
|
||||
{
|
||||
return _failed;
|
||||
@@ -380,6 +386,15 @@ namespace
|
||||
};
|
||||
|
||||
DataServiceHandler::Data DataServiceHandler::_data;
|
||||
|
||||
class SleepClientServiceHandler
|
||||
{
|
||||
public:
|
||||
SleepClientServiceHandler(Poco::Net::StreamSocket& socket, Poco::Net::SocketReactor& reactor)
|
||||
{
|
||||
Poco::Thread::sleep(500);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +420,7 @@ void SocketReactorTest::testSocketReactor()
|
||||
ClientServiceHandler::resetData();
|
||||
reactor.run();
|
||||
std::string data(ClientServiceHandler::data());
|
||||
assertTrue (data.size() == 1024);
|
||||
assertTrue (data.size() == DATA_SIZE);
|
||||
assertTrue (!ClientServiceHandler::readableError());
|
||||
assertTrue (!ClientServiceHandler::writableError());
|
||||
assertTrue (!ClientServiceHandler::timeoutError());
|
||||
@@ -425,7 +440,7 @@ void SocketReactorTest::testSetSocketReactor()
|
||||
ClientServiceHandler::resetData();
|
||||
reactor.run();
|
||||
std::string data(ClientServiceHandler::data());
|
||||
assertTrue (data.size() == 1024);
|
||||
assertTrue (data.size() == DATA_SIZE);
|
||||
assertTrue (!ClientServiceHandler::readableError());
|
||||
assertTrue (!ClientServiceHandler::writableError());
|
||||
assertTrue (!ClientServiceHandler::timeoutError());
|
||||
@@ -434,27 +449,26 @@ void SocketReactorTest::testSetSocketReactor()
|
||||
|
||||
void SocketReactorTest::testParallelSocketReactor()
|
||||
{
|
||||
SocketAddress ssa;
|
||||
SocketAddress ssa("127.0.0.1:22087");
|
||||
ServerSocket ss(ssa);
|
||||
SocketReactor reactor;
|
||||
ParallelSocketAcceptor<EchoServiceHandler, SocketReactor> acceptor(ss, reactor);
|
||||
ParallelSocketAcceptor<EchoServiceHandler, SocketReactor> acceptor(ss, reactor, REACTORS_COUNT);
|
||||
|
||||
SocketAddress sa("127.0.0.1", ss.address().port());
|
||||
SocketConnector<ClientServiceHandler> connector1(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector2(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector3(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector4(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector5(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector6(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector7(sa, reactor);
|
||||
SocketConnector<ClientServiceHandler> connector8(sa, reactor);
|
||||
std::vector<SocketConnector<ClientServiceHandler>*> connectors;
|
||||
for (int i = 0; i < REACTORS_COUNT; ++i)
|
||||
connectors.push_back(new SocketConnector<ClientServiceHandler>(sa, reactor));
|
||||
|
||||
ClientServiceHandler::setOnce(false);
|
||||
ClientServiceHandler::resetData();
|
||||
reactor.run();
|
||||
|
||||
std::string data(ClientServiceHandler::data());
|
||||
assertTrue (data.size() == 8192);
|
||||
assertTrue (data.size() == MAX_DATA_SIZE);
|
||||
assertTrue (!ClientServiceHandler::readableError());
|
||||
assertTrue (!ClientServiceHandler::writableError());
|
||||
assertTrue (!ClientServiceHandler::timeoutError());
|
||||
for (auto& c : connectors) delete c;
|
||||
}
|
||||
|
||||
|
||||
@@ -573,6 +587,42 @@ void SocketReactorTest::testDataCollection()
|
||||
}
|
||||
|
||||
|
||||
void SocketReactorTest::testSocketConnectorDeadlock()
|
||||
{
|
||||
SocketAddress ssa;
|
||||
ServerSocket ss(ssa);
|
||||
SocketAddress sa("127.0.0.1", ss.address().port());
|
||||
SocketReactor reactor;
|
||||
Thread thread;
|
||||
int i = 0;
|
||||
while (++i < 10)
|
||||
{
|
||||
auto sc = new SocketConnector<SleepClientServiceHandler>(sa, reactor);
|
||||
thread.startFunc([&reactor]() { reactor.run(); });
|
||||
reactor.stop();
|
||||
thread.join();
|
||||
delete sc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SocketReactorTest::testSocketReactorWakeup()
|
||||
{
|
||||
SocketReactor::Params params;
|
||||
params.pollTimeout = 1000000000;
|
||||
params.sleepLimit = 1000000000;
|
||||
SocketReactor reactor(params);
|
||||
Thread thread;
|
||||
Stopwatch sw;
|
||||
sw.start();
|
||||
thread.start(reactor);
|
||||
reactor.stop();
|
||||
thread.join();
|
||||
sw.stop();
|
||||
assertTrue (sw.elapsed() < 100000);
|
||||
}
|
||||
|
||||
|
||||
void SocketReactorTest::setUp()
|
||||
{
|
||||
ClientServiceHandler::setCloseOnTimeout(false);
|
||||
@@ -594,6 +644,8 @@ CppUnit::Test* SocketReactorTest::suite()
|
||||
CppUnit_addTest(pSuite, SocketReactorTest, testSocketConnectorFail);
|
||||
CppUnit_addTest(pSuite, SocketReactorTest, testSocketConnectorTimeout);
|
||||
CppUnit_addTest(pSuite, SocketReactorTest, testDataCollection);
|
||||
CppUnit_addTest(pSuite, SocketReactorTest, testSocketConnectorDeadlock);
|
||||
CppUnit_addTest(pSuite, SocketReactorTest, testSocketReactorWakeup);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ public:
|
||||
void testSocketConnectorFail();
|
||||
void testSocketConnectorTimeout();
|
||||
void testDataCollection();
|
||||
void testSocketConnectorDeadlock();
|
||||
void testSocketReactorWakeup();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
+2
-2
@@ -111,11 +111,11 @@ void SocketStreamTest::testEOF()
|
||||
assertTrue (str.gcount() == 5);
|
||||
assertTrue (std::string(buffer, 5) == "hello");
|
||||
}
|
||||
|
||||
|
||||
int c = str.get();
|
||||
assertTrue (c == -1);
|
||||
assertTrue (str.eof());
|
||||
|
||||
|
||||
ss.close();
|
||||
}
|
||||
|
||||
|
||||
+55
-20
@@ -64,6 +64,41 @@ void SocketTest::testEcho()
|
||||
}
|
||||
|
||||
|
||||
void SocketTest::testMoveStreamSocket()
|
||||
{
|
||||
EchoServer echoServer;
|
||||
StreamSocket ss0 = StreamSocket();
|
||||
ss0.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
StreamSocket ss(std::move(ss0));
|
||||
#if POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue (ss0.isNull());
|
||||
#else
|
||||
assertFalse (ss0.isNull());
|
||||
#endif
|
||||
|
||||
char buffer[256];
|
||||
std::memset(buffer, 0, sizeof(buffer));
|
||||
ss0 = ss;
|
||||
assertTrue (ss0.impl());
|
||||
assertTrue (ss.impl());
|
||||
assertTrue (ss0.impl() == ss.impl());
|
||||
ss = std::move(ss0);
|
||||
#if POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue (ss0.isNull());
|
||||
#else
|
||||
assertFalse (ss0.isNull());
|
||||
#endif
|
||||
assertTrue (ss.impl());
|
||||
int n = ss.sendBytes("hello", 5);
|
||||
assertTrue (n == 5);
|
||||
n = ss.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n == 5);
|
||||
assertTrue (std::string(buffer, n) == "hello");
|
||||
ss.close();
|
||||
ss0.close();
|
||||
}
|
||||
|
||||
|
||||
void SocketTest::testPoll()
|
||||
{
|
||||
EchoServer echoServer;
|
||||
@@ -144,7 +179,7 @@ void SocketTest::testFIFOBuffer()
|
||||
|
||||
n = ss.receiveBytes(f);
|
||||
assertTrue (n == 5);
|
||||
|
||||
|
||||
assertTrue (2 == _notToReadable);
|
||||
assertTrue (1 == _readableToNot);
|
||||
assertTrue (1 == _notToWritable);
|
||||
@@ -257,14 +292,14 @@ void SocketTest::testAssign()
|
||||
ServerSocket serv;
|
||||
StreamSocket ss1;
|
||||
StreamSocket ss2;
|
||||
|
||||
|
||||
assertTrue (ss1 != ss2);
|
||||
StreamSocket ss3(ss1);
|
||||
assertTrue (ss1 == ss3);
|
||||
ss3 = ss2;
|
||||
assertTrue (ss1 != ss3);
|
||||
assertTrue (ss2 == ss3);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ss1 = serv;
|
||||
@@ -273,7 +308,7 @@ void SocketTest::testAssign()
|
||||
catch (InvalidArgumentException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
StreamSocket ss4(serv);
|
||||
@@ -291,7 +326,7 @@ void SocketTest::testAssign()
|
||||
catch (InvalidArgumentException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ServerSocket serv2(ss1);
|
||||
@@ -308,7 +343,7 @@ void SocketTest::testTimeout()
|
||||
EchoServer echoServer;
|
||||
StreamSocket ss;
|
||||
ss.connect(SocketAddress("127.0.0.1", echoServer.port()));
|
||||
|
||||
|
||||
Timespan timeout0 = ss.getReceiveTimeout();
|
||||
Timespan timeout(250000);
|
||||
ss.setReceiveTimeout(timeout);
|
||||
@@ -316,7 +351,7 @@ void SocketTest::testTimeout()
|
||||
std::cout << "original receive timeout: " << timeout0.totalMicroseconds() << std::endl;
|
||||
std::cout << "requested receive timeout: " << timeout.totalMicroseconds() << std::endl;
|
||||
std::cout << "actual receive timeout: " << timeout1.totalMicroseconds() << std::endl;
|
||||
|
||||
|
||||
// some socket implementations adjust the timeout value
|
||||
// assertTrue (ss.getReceiveTimeout() == timeout);
|
||||
Stopwatch sw;
|
||||
@@ -331,7 +366,7 @@ void SocketTest::testTimeout()
|
||||
{
|
||||
}
|
||||
assertTrue (sw.elapsed() < 1000000);
|
||||
|
||||
|
||||
timeout0 = ss.getSendTimeout();
|
||||
ss.setSendTimeout(timeout);
|
||||
timeout1 = ss.getSendTimeout();
|
||||
@@ -347,7 +382,7 @@ void SocketTest::testBufferSize()
|
||||
EchoServer echoServer;
|
||||
SocketAddress sa("127.0.0.1", 1234);
|
||||
StreamSocket ss(sa.family());
|
||||
|
||||
|
||||
int osz = ss.getSendBufferSize();
|
||||
int rsz = 32000;
|
||||
ss.setSendBufferSize(rsz);
|
||||
@@ -355,7 +390,7 @@ void SocketTest::testBufferSize()
|
||||
std::cout << "original send buffer size: " << osz << std::endl;
|
||||
std::cout << "requested send buffer size: " << rsz << std::endl;
|
||||
std::cout << "actual send buffer size: " << asz << std::endl;
|
||||
|
||||
|
||||
osz = ss.getReceiveBufferSize();
|
||||
ss.setReceiveBufferSize(rsz);
|
||||
asz = ss.getReceiveBufferSize();
|
||||
@@ -379,17 +414,17 @@ void SocketTest::testOptions()
|
||||
ss.setLinger(false, 0);
|
||||
ss.getLinger(f, t);
|
||||
assertTrue (!f);
|
||||
|
||||
|
||||
ss.setNoDelay(true);
|
||||
assertTrue (ss.getNoDelay());
|
||||
ss.setNoDelay(false);
|
||||
assertTrue (!ss.getNoDelay());
|
||||
|
||||
|
||||
ss.setKeepAlive(true);
|
||||
assertTrue (ss.getKeepAlive());
|
||||
ss.setKeepAlive(false);
|
||||
assertTrue (!ss.getKeepAlive());
|
||||
|
||||
|
||||
ss.setOOBInline(true);
|
||||
assertTrue (ss.getOOBInline());
|
||||
ss.setOOBInline(false);
|
||||
@@ -414,10 +449,9 @@ void SocketTest::testSelect()
|
||||
assertTrue (readList.empty());
|
||||
assertTrue (writeList.empty());
|
||||
assertTrue (exceptList.empty());
|
||||
|
||||
ss.sendBytes("hello", 5);
|
||||
|
||||
ss.poll(timeout, Socket::SELECT_READ);
|
||||
assertTrue (5 == ss.sendBytes("hello", 5));
|
||||
assertTrue (ss.poll(timeout, Socket::SELECT_READ));
|
||||
|
||||
readList.push_back(ss);
|
||||
writeList.push_back(ss);
|
||||
@@ -442,7 +476,7 @@ void SocketTest::testSelect2()
|
||||
EchoServer echoServer2;
|
||||
StreamSocket ss1(SocketAddress("127.0.0.1", echoServer1.port()));
|
||||
StreamSocket ss2(SocketAddress("127.0.0.1", echoServer2.port()));
|
||||
|
||||
|
||||
Socket::SocketList readList;
|
||||
Socket::SocketList writeList;
|
||||
Socket::SocketList exceptList;
|
||||
@@ -453,7 +487,7 @@ void SocketTest::testSelect2()
|
||||
assertTrue (readList.empty());
|
||||
assertTrue (writeList.empty());
|
||||
assertTrue (exceptList.empty());
|
||||
|
||||
|
||||
ss1.sendBytes("hello", 5);
|
||||
|
||||
ss1.poll(timeout, Socket::SELECT_READ);
|
||||
@@ -479,8 +513,8 @@ void SocketTest::testSelect2()
|
||||
assertTrue (Socket::select(readList, writeList, exceptList, timeout) == 2);
|
||||
assertTrue (readList.empty());
|
||||
assertTrue (writeList.size() == 2);
|
||||
assertTrue (writeList[0] == ss1);
|
||||
assertTrue (writeList[1] == ss2);
|
||||
assertTrue (writeList[0] == ss1 || writeList[1] == ss1);
|
||||
assertTrue (writeList[0] == ss2 || writeList[1] == ss2);
|
||||
assertTrue (exceptList.empty());
|
||||
|
||||
ss1.close();
|
||||
@@ -559,6 +593,7 @@ CppUnit::Test* SocketTest::suite()
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SocketTest");
|
||||
|
||||
CppUnit_addTest(pSuite, SocketTest, testEcho);
|
||||
CppUnit_addTest(pSuite, SocketTest, testMoveStreamSocket);
|
||||
CppUnit_addTest(pSuite, SocketTest, testPoll);
|
||||
CppUnit_addTest(pSuite, SocketTest, testAvailable);
|
||||
CppUnit_addTest(pSuite, SocketTest, testFIFOBuffer);
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ public:
|
||||
~SocketTest();
|
||||
|
||||
void testEcho();
|
||||
void testMoveStreamSocket();
|
||||
void testPoll();
|
||||
void testAvailable();
|
||||
void testFIFOBuffer();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "DialogSocketTest.h"
|
||||
#include "RawSocketTest.h"
|
||||
#include "PollSetTest.h"
|
||||
#include "SocketProactorTest.h"
|
||||
|
||||
|
||||
CppUnit::Test* SocketsTestSuite::suite()
|
||||
@@ -31,5 +32,6 @@ CppUnit::Test* SocketsTestSuite::suite()
|
||||
pSuite->addTest(MulticastSocketTest::suite());
|
||||
#endif
|
||||
pSuite->addTest(PollSetTest::suite());
|
||||
pSuite->addTest(SocketProactorTest::suite());
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
+41
-1
@@ -28,7 +28,7 @@ class CachingChannel: public Poco::Channel
|
||||
{
|
||||
public:
|
||||
typedef std::list<Poco::Message> Messages;
|
||||
|
||||
|
||||
CachingChannel(std::size_t n = 100);
|
||||
/// Creates the CachingChannel. Caches n messages in memory
|
||||
|
||||
@@ -63,6 +63,7 @@ std::size_t CachingChannel::getMaxSize() const
|
||||
|
||||
std::size_t CachingChannel::getCurrentSize() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||
return _size;
|
||||
}
|
||||
|
||||
@@ -144,6 +145,44 @@ void SyslogTest::testListener()
|
||||
assertTrue (msgs[0].getPriority() == Poco::Message::PRIO_CRITICAL);
|
||||
}
|
||||
|
||||
void SyslogTest::testChannelFacility()
|
||||
{
|
||||
Poco::AutoPtr<RemoteSyslogChannel> channel = new RemoteSyslogChannel();
|
||||
channel->setProperty("loghost", "127.0.0.1:51400");
|
||||
channel->setProperty("facility", "KERN");
|
||||
channel->open();
|
||||
Poco::AutoPtr<RemoteSyslogListener> listener = new RemoteSyslogListener(51400);
|
||||
listener->open();
|
||||
auto pCL = Poco::makeAuto<CachingChannel>();
|
||||
listener->addChannel(pCL);
|
||||
assertTrue (pCL->getCurrentSize() == 0);
|
||||
Poco::Message msg("asource", "amessage", Poco::Message::PRIO_CRITICAL);
|
||||
channel->log(msg);
|
||||
channel->setProperty("facility", "USER");
|
||||
msg.setText("asecondmessage");
|
||||
channel->log(msg);
|
||||
assertFalse (msg.has("facility"));
|
||||
Poco::Thread::sleep(1000);
|
||||
listener->close();
|
||||
channel->close();
|
||||
assertTrue (pCL->getCurrentSize() == 2);
|
||||
std::vector<Poco::Message> msgs;
|
||||
pCL->getMessages(msgs, 0, 10);
|
||||
|
||||
assertTrue (msgs.size() == 2);
|
||||
|
||||
assertTrue (msgs[1].getSource() == "asource");
|
||||
assertTrue (msgs[1].getText() == "amessage");
|
||||
assertTrue (msgs[1].getPriority() == Poco::Message::PRIO_CRITICAL);
|
||||
assertTrue (msgs[1].has("facility"));
|
||||
assertTrue (msgs[1].get("facility") == "KERN");
|
||||
|
||||
assertTrue (msgs[0].getSource() == "asource");
|
||||
assertTrue (msgs[0].getText() == "asecondmessage");
|
||||
assertTrue (msgs[0].getPriority() == Poco::Message::PRIO_CRITICAL);
|
||||
assertTrue (msgs[0].has("facility"));
|
||||
assertTrue (msgs[0].get("facility") == "USER");
|
||||
}
|
||||
|
||||
void SyslogTest::testChannelOpenClose()
|
||||
{
|
||||
@@ -262,6 +301,7 @@ CppUnit::Test* SyslogTest::suite()
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SyslogTest");
|
||||
|
||||
CppUnit_addTest(pSuite, SyslogTest, testListener);
|
||||
CppUnit_addTest(pSuite, SyslogTest, testChannelFacility);
|
||||
CppUnit_addTest(pSuite, SyslogTest, testChannelOpenClose);
|
||||
CppUnit_addTest(pSuite, SyslogTest, testOldBSD);
|
||||
CppUnit_addTest(pSuite, SyslogTest, testStructuredData);
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ public:
|
||||
~SyslogTest();
|
||||
|
||||
void testListener();
|
||||
void testChannelFacility();
|
||||
void testChannelOpenClose();
|
||||
void testOldBSD();
|
||||
void testStructuredData();
|
||||
|
||||
+11
-11
@@ -41,7 +41,7 @@ namespace
|
||||
EchoConnection(const StreamSocket& s): TCPServerConnection(s)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void run()
|
||||
{
|
||||
StreamSocket& ss = socket();
|
||||
@@ -61,7 +61,7 @@ namespace
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class RejectFilter: public TCPServerConnectionFilter
|
||||
{
|
||||
public:
|
||||
@@ -91,7 +91,7 @@ void TCPServerTest::testOneConnection()
|
||||
assertTrue (srv.currentThreads() == 0);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 0);
|
||||
|
||||
|
||||
SocketAddress sa("127.0.0.1", srv.socket().address().port());
|
||||
StreamSocket ss1(sa);
|
||||
std::string data("hello, world");
|
||||
@@ -118,7 +118,7 @@ void TCPServerTest::testTwoConnections()
|
||||
assertTrue (srv.currentThreads() == 0);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 0);
|
||||
|
||||
|
||||
SocketAddress sa("127.0.0.1", srv.socket().address().port());
|
||||
StreamSocket ss1(sa);
|
||||
StreamSocket ss2(sa);
|
||||
@@ -134,7 +134,7 @@ void TCPServerTest::testTwoConnections()
|
||||
n = ss2.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n > 0);
|
||||
assertTrue (std::string(buffer, n) == data);
|
||||
|
||||
|
||||
assertTrue (srv.currentConnections() == 2);
|
||||
assertTrue (srv.currentThreads() == 2);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
@@ -166,7 +166,7 @@ void TCPServerTest::testMultiConnections()
|
||||
assertTrue (srv.maxThreads() >= 4);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 0);
|
||||
|
||||
|
||||
SocketAddress sa("127.0.0.1", svs.address().port());
|
||||
StreamSocket ss1(sa);
|
||||
StreamSocket ss2(sa);
|
||||
@@ -194,19 +194,19 @@ void TCPServerTest::testMultiConnections()
|
||||
n = ss4.receiveBytes(buffer, sizeof(buffer));
|
||||
assertTrue (n > 0);
|
||||
assertTrue (std::string(buffer, n) == data);
|
||||
|
||||
|
||||
assertTrue (srv.currentConnections() == 4);
|
||||
assertTrue (srv.currentThreads() == 4);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 4);
|
||||
|
||||
|
||||
StreamSocket ss5(sa);
|
||||
Thread::sleep(200);
|
||||
assertTrue (srv.queuedConnections() == 1);
|
||||
StreamSocket ss6(sa);
|
||||
Thread::sleep(200);
|
||||
assertTrue (srv.queuedConnections() == 2);
|
||||
|
||||
|
||||
ss1.close();
|
||||
Thread::sleep(2000);
|
||||
assertTrue (srv.currentConnections() == 4);
|
||||
@@ -220,7 +220,7 @@ void TCPServerTest::testMultiConnections()
|
||||
assertTrue (srv.currentThreads() == 4);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 6);
|
||||
|
||||
|
||||
ss3.close();
|
||||
Thread::sleep(2000);
|
||||
assertTrue (srv.currentConnections() == 3);
|
||||
@@ -262,7 +262,7 @@ void TCPServerTest::testFilter()
|
||||
assertTrue (srv.currentThreads() == 0);
|
||||
assertTrue (srv.queuedConnections() == 0);
|
||||
assertTrue (srv.totalConnections() == 0);
|
||||
|
||||
|
||||
SocketAddress sa("127.0.0.1", srv.socket().address().port());
|
||||
StreamSocket ss(sa);
|
||||
|
||||
|
||||
+4
-4
@@ -38,10 +38,10 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
Poco::Net::SocketAddress address() const;
|
||||
/// Returns the address of the server.
|
||||
|
||||
/// Returns the address of the server.
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
Poco::Net::DatagramSocket _socket;
|
||||
Poco::Thread _thread;
|
||||
Poco::Event _ready;
|
||||
bool _stop;
|
||||
std::atomic<bool> _stop;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -45,7 +45,10 @@ namespace
|
||||
{
|
||||
struct TestUDPHandler : public Poco::Net::UDPHandler
|
||||
{
|
||||
TestUDPHandler() : counter(0), errCounter(0) {}
|
||||
TestUDPHandler() : counter(0), errCounter(0)
|
||||
{
|
||||
start();
|
||||
}
|
||||
|
||||
void processData(char *buf)
|
||||
{
|
||||
|
||||
+13
-9
@@ -81,7 +81,7 @@ namespace
|
||||
private:
|
||||
std::size_t _bufSize;
|
||||
};
|
||||
|
||||
|
||||
class WebSocketRequestHandlerFactory: public Poco::Net::HTTPRequestHandlerFactory
|
||||
{
|
||||
public:
|
||||
@@ -115,13 +115,17 @@ void WebSocketTest::testWebSocket()
|
||||
Poco::Net::ServerSocket ss(0);
|
||||
Poco::Net::HTTPServer server(new WebSocketRequestHandlerFactory, ss, new Poco::Net::HTTPServerParams);
|
||||
server.start();
|
||||
|
||||
|
||||
Poco::Thread::sleep(200);
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", ss.address().port());
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/ws", HTTPRequest::HTTP_1_1);
|
||||
HTTPResponse response;
|
||||
WebSocket ws(cs, request, response);
|
||||
WebSocket ws0 = WebSocket(cs, request, response);
|
||||
WebSocket ws(std::move(ws0));
|
||||
#ifdef POCO_NEW_STATE_ON_MOVE
|
||||
assertTrue(ws0.impl() == nullptr);
|
||||
#endif
|
||||
|
||||
std::string payload("x");
|
||||
ws.sendFrame(payload.data(), (int) payload.size());
|
||||
@@ -174,19 +178,19 @@ void WebSocketTest::testWebSocket()
|
||||
assertTrue (n == payload.size());
|
||||
assertTrue (payload.compare(0, payload.size(), buffer, n) == 0);
|
||||
assertTrue (flags == WebSocket::FRAME_TEXT);
|
||||
|
||||
|
||||
payload = "Hello, universe!";
|
||||
ws.sendFrame(payload.data(), (int) payload.size(), WebSocket::FRAME_BINARY);
|
||||
n = ws.receiveFrame(buffer, sizeof(buffer), flags);
|
||||
assertTrue (n == payload.size());
|
||||
assertTrue (payload.compare(0, payload.size(), buffer, n) == 0);
|
||||
assertTrue (flags == WebSocket::FRAME_BINARY);
|
||||
|
||||
|
||||
ws.shutdown();
|
||||
n = ws.receiveFrame(buffer, sizeof(buffer), flags);
|
||||
assertTrue (n == 2);
|
||||
assertTrue ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_CLOSE);
|
||||
|
||||
|
||||
server.stop();
|
||||
}
|
||||
|
||||
@@ -198,9 +202,9 @@ void WebSocketTest::testWebSocketLarge()
|
||||
Poco::Net::ServerSocket ss(0);
|
||||
Poco::Net::HTTPServer server(new WebSocketRequestHandlerFactory(msgSize), ss, new Poco::Net::HTTPServerParams);
|
||||
server.start();
|
||||
|
||||
|
||||
Poco::Thread::sleep(200);
|
||||
|
||||
|
||||
HTTPClientSession cs("127.0.0.1", ss.address().port());
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/ws", HTTPRequest::HTTP_1_1);
|
||||
HTTPResponse response;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ int wmain(int argc, wchar_t* argv[])
|
||||
std::wcstombs(buffer, argv[i], sizeof(buffer));
|
||||
args.push_back(std::string(buffer));
|
||||
}
|
||||
CppUnit::TestRunner runner;
|
||||
CppUnit::TestRunner runner;
|
||||
runner.addTest("NetTestSuite", NetTestSuite::suite());
|
||||
return runner.run(args) ? 0 : 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user