You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 07:36:32 +09:00
3.5 updates
This commit is contained in:
107
AllSamples.sln
107
AllSamples.sln
@@ -1,107 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
|
||||||
# Visual Studio 2008
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "Lidgren.Network\Lidgren.Network.csproj", "{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{9D7AC4F7-39CD-4BC8-8F45-00B67C196340}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{DA6697E7-4DD4-45EF-90A7-2FC265855019}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplesCommon", "Samples\SamplesCommon\SamplesCommon.csproj", "{773069DA-B66E-4667-ADCB-0D215AD8CF3E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageServer", "Samples\ImageServer\ImageServer.csproj", "{36382EFB-BE9E-45B3-BEC8-E70F65CDF868}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageClient", "Samples\ImageClient\ImageClient.csproj", "{69E64B8C-4736-4334-87BF-DD631A3AD144}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatServer", "Samples\ChatServer\ChatServer.csproj", "{E2711561-B3C9-4580-B054-891CE54E15EE}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient", "Samples\ChatClient\ChatClient.csproj", "{321F68AE-7F97-415E-A3F9-7C477EFF95EE}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DurableServer", "Samples\DurableServer\DurableServer.csproj", "{034984CA-FB37-44AF-BBF9-EC58ED75F5F3}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DurableClient", "Samples\DurableClient\DurableClient.csproj", "{0B4B02BB-0F43-4466-A369-0682281AF60E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarebonesServer", "Samples\BarebonesServer\BarebonesServer.csproj", "{438173C5-8E95-4AE1-AAAB-5C1009F05302}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarebonesClient", "Samples\BarebonesClient\BarebonesClient.csproj", "{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManyServer", "Samples\ManyServer\ManyServer.csproj", "{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManyClients", "Samples\ManyClients\ManyClients.csproj", "{A41772F5-F20F-408D-ABD1-5D1C144853C6}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{9D7AC4F7-39CD-4BC8-8F45-00B67C196340}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{9D7AC4F7-39CD-4BC8-8F45-00B67C196340}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{9D7AC4F7-39CD-4BC8-8F45-00B67C196340}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{9D7AC4F7-39CD-4BC8-8F45-00B67C196340}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{36382EFB-BE9E-45B3-BEC8-E70F65CDF868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{36382EFB-BE9E-45B3-BEC8-E70F65CDF868}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{36382EFB-BE9E-45B3-BEC8-E70F65CDF868}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{36382EFB-BE9E-45B3-BEC8-E70F65CDF868}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{69E64B8C-4736-4334-87BF-DD631A3AD144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{69E64B8C-4736-4334-87BF-DD631A3AD144}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{69E64B8C-4736-4334-87BF-DD631A3AD144}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{69E64B8C-4736-4334-87BF-DD631A3AD144}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{E2711561-B3C9-4580-B054-891CE54E15EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E2711561-B3C9-4580-B054-891CE54E15EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E2711561-B3C9-4580-B054-891CE54E15EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E2711561-B3C9-4580-B054-891CE54E15EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{321F68AE-7F97-415E-A3F9-7C477EFF95EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{321F68AE-7F97-415E-A3F9-7C477EFF95EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{321F68AE-7F97-415E-A3F9-7C477EFF95EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{321F68AE-7F97-415E-A3F9-7C477EFF95EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{034984CA-FB37-44AF-BBF9-EC58ED75F5F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{034984CA-FB37-44AF-BBF9-EC58ED75F5F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{034984CA-FB37-44AF-BBF9-EC58ED75F5F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{034984CA-FB37-44AF-BBF9-EC58ED75F5F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0B4B02BB-0F43-4466-A369-0682281AF60E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0B4B02BB-0F43-4466-A369-0682281AF60E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0B4B02BB-0F43-4466-A369-0682281AF60E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0B4B02BB-0F43-4466-A369-0682281AF60E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{438173C5-8E95-4AE1-AAAB-5C1009F05302}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{438173C5-8E95-4AE1-AAAB-5C1009F05302}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{438173C5-8E95-4AE1-AAAB-5C1009F05302}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{438173C5-8E95-4AE1-AAAB-5C1009F05302}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{A41772F5-F20F-408D-ABD1-5D1C144853C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{A41772F5-F20F-408D-ABD1-5D1C144853C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{A41772F5-F20F-408D-ABD1-5D1C144853C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{A41772F5-F20F-408D-ABD1-5D1C144853C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{36382EFB-BE9E-45B3-BEC8-E70F65CDF868} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{69E64B8C-4736-4334-87BF-DD631A3AD144} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{E2711561-B3C9-4580-B054-891CE54E15EE} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{321F68AE-7F97-415E-A3F9-7C477EFF95EE} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{034984CA-FB37-44AF-BBF9-EC58ED75F5F3} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{0B4B02BB-0F43-4466-A369-0682281AF60E} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{438173C5-8E95-4AE1-AAAB-5C1009F05302} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{BC0CBAEE-70FE-4B1E-A2FA-BCC731F1E48F} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{44EFFA4A-C7FC-4C45-B84D-F13A391EF4E7} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
{A41772F5-F20F-408D-ABD1-5D1C144853C6} = {DA6697E7-4DD4-45EF-90A7-2FC265855019}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
26
Lidgren.Network.sln
Normal file
26
Lidgren.Network.sln
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "Lidgren.Network\Lidgren.Network.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{1515E834-F71E-4D9C-B601-74C709D3A0AE}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1515E834-F71E-4D9C-B601-74C709D3A0AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1515E834-F71E-4D9C-B601-74C709D3A0AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1515E834-F71E-4D9C-B601-74C709D3A0AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1515E834-F71E-4D9C-B601-74C709D3A0AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -5,13 +5,21 @@
|
|||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>9.0.21022</ProductVersion>
|
<ProductVersion>9.0.21022</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD}</ProjectGuid>
|
<ProjectGuid>{AE483C29-042E-4226-BA52-D247CE7676DA}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Lidgren.Network</RootNamespace>
|
<RootNamespace>Lidgren.Network</RootNamespace>
|
||||||
<AssemblyName>Lidgren.Network</AssemblyName>
|
<AssemblyName>Lidgren.Network</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>
|
||||||
|
</SccProjectName>
|
||||||
|
<SccLocalPath>
|
||||||
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -21,7 +29,6 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
@@ -30,64 +37,76 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.DataSetExtensions">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="NetBigInteger.cs" />
|
|
||||||
<Compile Include="NetBigIntegerBC.cs" />
|
|
||||||
<Compile Include="NetBitVector.cs" />
|
<Compile Include="NetBitVector.cs" />
|
||||||
<Compile Include="NetConnectionStatistics.cs" />
|
|
||||||
<Compile Include="NetBitWriter.cs" />
|
<Compile Include="NetBitWriter.cs" />
|
||||||
<Compile Include="NetClient.cs" />
|
<Compile Include="NetClient.cs" />
|
||||||
<Compile Include="NetConnection.cs" />
|
<Compile Include="NetConnection.cs" />
|
||||||
<Compile Include="NetConnection.Handshake.cs" />
|
<Compile Include="NetConnection.Handshake.cs" />
|
||||||
<Compile Include="NetConnection.Latency.cs" />
|
<Compile Include="NetConnection.Latency.cs" />
|
||||||
<Compile Include="NetConnection.Reliability.cs" />
|
<Compile Include="NetConnectionStatistics.cs" />
|
||||||
<Compile Include="NetConnectionStatus.cs" />
|
<Compile Include="NetConnectionStatus.cs" />
|
||||||
<Compile Include="NetConstants.cs" />
|
<Compile Include="NetConstants.cs" />
|
||||||
|
<Compile Include="NetDeliveryMethod.cs" />
|
||||||
|
<Compile Include="NetEncryption.cs" />
|
||||||
<Compile Include="NetException.cs" />
|
<Compile Include="NetException.cs" />
|
||||||
<Compile Include="NetFragmentationInfo.cs" />
|
<Compile Include="NetFragmentationHelper.cs" />
|
||||||
<Compile Include="NetIncomingMessage.cs" />
|
<Compile Include="NetIncomingMessage.cs" />
|
||||||
<Compile Include="NetIncomingMessage.Peek.cs" />
|
<Compile Include="NetIncomingMessage.Peek.cs" />
|
||||||
<Compile Include="NetIncomingMessage.Read.cs" />
|
<Compile Include="NetIncomingMessage.Read.cs" />
|
||||||
<Compile Include="NetIncomingMessage.Read.Reflection.cs" />
|
<Compile Include="NetIncomingMessage.Read.Reflection.cs" />
|
||||||
<Compile Include="NetIncomingMessage.Stream.cs" />
|
|
||||||
<Compile Include="NetIncomingMessage.Write.cs" />
|
<Compile Include="NetIncomingMessage.Write.cs" />
|
||||||
<Compile Include="NetIncomingMessageType.cs" />
|
<Compile Include="NetIncomingMessageType.cs" />
|
||||||
<Compile Include="NetMessageType.cs" />
|
<Compile Include="NetMessageType.cs" />
|
||||||
<Compile Include="NetNatIntroduction.cs" />
|
<Compile Include="NetNatIntroduction.cs" />
|
||||||
<Compile Include="NetOutgoingMessage.cs" />
|
<Compile Include="NetOutgoingMessage.cs" />
|
||||||
<Compile Include="NetOutgoingMessage.Stream.cs" />
|
|
||||||
<Compile Include="NetOutgoingMessage.Write.cs" />
|
<Compile Include="NetOutgoingMessage.Write.cs" />
|
||||||
<Compile Include="NetOutgoingMessage.Write.Reflection.cs" />
|
<Compile Include="NetOutgoingMessage.Write.Reflection.cs" />
|
||||||
<Compile Include="NetPeer.ConnectionApproval.cs" />
|
|
||||||
<Compile Include="NetPeer.cs" />
|
<Compile Include="NetPeer.cs" />
|
||||||
<Compile Include="NetPeer.Discovery.cs" />
|
<Compile Include="NetPeer.Discovery.cs" />
|
||||||
|
<Compile Include="NetPeer.Fragmentation.cs" />
|
||||||
<Compile Include="NetPeer.Internal.cs" />
|
<Compile Include="NetPeer.Internal.cs" />
|
||||||
<Compile Include="NetPeer.LatencySimulation.cs" />
|
<Compile Include="NetPeer.LatencySimulation.cs" />
|
||||||
<Compile Include="NetPeer.Logging.cs" />
|
<Compile Include="NetPeer.Logging.cs" />
|
||||||
<Compile Include="NetPeer.Recycling.cs" />
|
<Compile Include="NetPeer.MessagePools.cs" />
|
||||||
|
<Compile Include="NetPeer.Send.cs" />
|
||||||
<Compile Include="NetPeerConfiguration.cs" />
|
<Compile Include="NetPeerConfiguration.cs" />
|
||||||
<Compile Include="NetPeerStatistics.cs" />
|
<Compile Include="NetPeerStatistics.cs" />
|
||||||
<Compile Include="NetPeerStatus.cs" />
|
<Compile Include="NetPeerStatus.cs" />
|
||||||
<Compile Include="NetQueue.cs" />
|
<Compile Include="NetQueue.cs" />
|
||||||
<Compile Include="NetRandom.cs" />
|
<Compile Include="NetRandom.cs" />
|
||||||
<Compile Include="NetSending.cs" />
|
<Compile Include="NetReceiverChannelBase.cs" />
|
||||||
|
<Compile Include="NetReliableOrderedReceiver.cs" />
|
||||||
|
<Compile Include="NetReliableSenderChannel.cs" />
|
||||||
|
<Compile Include="NetReliableSequencedReceiver.cs" />
|
||||||
|
<Compile Include="NetReliableUnorderedReceiver.cs" />
|
||||||
|
<Compile Include="NetSenderChannelBase.cs" />
|
||||||
|
<Compile Include="NetSendResult.cs" />
|
||||||
<Compile Include="NetServer.cs" />
|
<Compile Include="NetServer.cs" />
|
||||||
|
<Compile Include="NetStoredReliableMessage.cs" />
|
||||||
<Compile Include="NetTime.cs" />
|
<Compile Include="NetTime.cs" />
|
||||||
|
<Compile Include="NetTuple.cs" />
|
||||||
|
<Compile Include="NetUnreliableSenderChannel.cs" />
|
||||||
|
<Compile Include="NetUnreliableSequencedReceiver.cs" />
|
||||||
|
<Compile Include="NetUnreliableUnorderedReceiver.cs" />
|
||||||
<Compile Include="NetUtility.cs" />
|
<Compile Include="NetUtility.cs" />
|
||||||
<Compile Include="NetEncryption.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
<Compile Include="SenderChannelBase.cs" />
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Documentation\ChangedFromV2.txt" />
|
|
||||||
<Content Include="Documentation\PacketLayout.txt" />
|
|
||||||
<Content Include="Documentation\TODO.txt" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|||||||
@@ -1,43 +1,20 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2008
|
# Visual Studio 2008
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplesCommon", "..\SamplesCommon\SamplesCommon.csproj", "{773069DA-B66E-4667-ADCB-0D215AD8CF3E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "..\..\Lidgren.Network\Lidgren.Network.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "..\..\Lidgren.Network\Lidgren.Network.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatServer", "ChatServer\ChatServer.csproj", "{C5473E52-7601-48CA-BFEB-1AB012F3D4BF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatServer", "ChatServer\ChatServer.csproj", "{C5473E52-7601-48CA-BFEB-1AB012F3D4BF}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient", "ChatClient\ChatClient.csproj", "{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient", "ChatClient\ChatClient.csproj", "{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplesCommon", "..\SamplesCommon\SamplesCommon.csproj", "{773069DA-B66E-4667-ADCB-0D215AD8CF3E}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SourceCodeControl) = preSolution
|
|
||||||
SccNumberOfProjects = 5
|
|
||||||
SccProjectName0 = Perforce\u0020Project
|
|
||||||
SccLocalPath0 = ..\\..
|
|
||||||
SccProvider0 = MSSCCI:Perforce\u0020SCM
|
|
||||||
SccProjectFilePathRelativizedFromConnection0 = Samples\\Chat\\
|
|
||||||
SccProjectUniqueName1 = ..\\..\\Lidgren.Network\\Lidgren.Network.csproj
|
|
||||||
SccLocalPath1 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection1 = Lidgren.Network\\
|
|
||||||
SccProjectUniqueName2 = ChatClient\\ChatClient.csproj
|
|
||||||
SccLocalPath2 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection2 = Samples\\Chat\\ChatClient\\
|
|
||||||
SccProjectUniqueName3 = ChatServer\\ChatServer.csproj
|
|
||||||
SccLocalPath3 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection3 = Samples\\Chat\\ChatServer\\
|
|
||||||
SccProjectUniqueName4 = ..\\SamplesCommon\\SamplesCommon.csproj
|
|
||||||
SccLocalPath4 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection4 = Samples\\SamplesCommon\\
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -50,6 +27,10 @@ Global
|
|||||||
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Release|Any CPU.Build.0 = Release|Any CPU
|
{B166F0BF-FB75-41F1-A527-B289BDF0FA0C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>ChatClient</AssemblyName>
|
<AssemblyName>ChatClient</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>ChatServer</AssemblyName>
|
<AssemblyName>ChatServer</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>MSClient</AssemblyName>
|
<AssemblyName>MSClient</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>MSCommon</AssemblyName>
|
<AssemblyName>MSCommon</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>MSServer</AssemblyName>
|
<AssemblyName>MSServer</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>MasterServer</AssemblyName>
|
<AssemblyName>MasterServer</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -12,28 +12,6 @@ EndProject
|
|||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSServer", "MSServer\MSServer.csproj", "{BBE12F3E-098F-4C13-842F-A52B86E2611A}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSServer", "MSServer\MSServer.csproj", "{BBE12F3E-098F-4C13-842F-A52B86E2611A}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SourceCodeControl) = preSolution
|
|
||||||
SccNumberOfProjects = 6
|
|
||||||
SccProjectName0 = Perforce\u0020Project
|
|
||||||
SccLocalPath0 = ..\\..
|
|
||||||
SccProvider0 = MSSCCI:Perforce\u0020SCM
|
|
||||||
SccProjectFilePathRelativizedFromConnection0 = Samples\\MasterServerSample\\
|
|
||||||
SccProjectUniqueName1 = ..\\..\\Lidgren.Network\\Lidgren.Network.csproj
|
|
||||||
SccLocalPath1 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection1 = Lidgren.Network\\
|
|
||||||
SccProjectUniqueName2 = MasterServer\\MasterServer.csproj
|
|
||||||
SccLocalPath2 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection2 = Samples\\MasterServerSample\\MasterServer\\
|
|
||||||
SccProjectUniqueName3 = MSClient\\MSClient.csproj
|
|
||||||
SccLocalPath3 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection3 = Samples\\MasterServerSample\\MSClient\\
|
|
||||||
SccProjectUniqueName4 = MSCommon\\MSCommon.csproj
|
|
||||||
SccLocalPath4 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection4 = Samples\\MasterServerSample\\MSCommon\\
|
|
||||||
SccProjectUniqueName5 = MSServer\\MSServer.csproj
|
|
||||||
SccLocalPath5 = ..\\..
|
|
||||||
SccProjectFilePathRelativizedFromConnection5 = Samples\\MasterServerSample\\MSServer\\
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
|||||||
60
Samples/SamplesCommon/NativeMethods.cs
Normal file
60
Samples/SamplesCommon/NativeMethods.cs
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace SamplesCommon
|
||||||
|
{
|
||||||
|
public static class NativeMethods
|
||||||
|
{
|
||||||
|
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||||
|
public static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
|
||||||
|
public const int WM_VSCROLL = 277; // Vertical scroll
|
||||||
|
public const int SB_BOTTOM = 7; // Scroll to bottom
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct PeekMsg
|
||||||
|
{
|
||||||
|
public IntPtr hWnd;
|
||||||
|
public Message msg;
|
||||||
|
public IntPtr wParam;
|
||||||
|
public IntPtr lParam;
|
||||||
|
public uint time;
|
||||||
|
public System.Drawing.Point p;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously
|
||||||
|
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||||
|
public static extern bool PeekMessage(out PeekMsg msg, IntPtr hWnd, uint messageFilterMin, uint messageFilterMax, uint flags);
|
||||||
|
|
||||||
|
public static bool AppStillIdle
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
PeekMsg msg;
|
||||||
|
return !PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AppendText(RichTextBox box, string line)
|
||||||
|
{
|
||||||
|
if (box == null || box.IsDisposed)
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
box.AppendText(line + Environment.NewLine);
|
||||||
|
ScrollRichTextBox(box);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ScrollRichTextBox(RichTextBox box)
|
||||||
|
{
|
||||||
|
if (box == null || box.IsDisposed || box.Disposing)
|
||||||
|
return;
|
||||||
|
SendMessage(box.Handle, WM_VSCROLL, (IntPtr)SB_BOTTOM, IntPtr.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
327
Samples/SamplesCommon/NetPeerSettingsWindow.Designer.cs
generated
Normal file
327
Samples/SamplesCommon/NetPeerSettingsWindow.Designer.cs
generated
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
namespace SamplesCommon
|
||||||
|
{
|
||||||
|
partial class NetPeerSettingsWindow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.DebugCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.VerboseCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
|
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.LossTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MinLatencyTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
|
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.StatisticsLabel = new System.Windows.Forms.Label();
|
||||||
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.groupBox3.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// DebugCheckBox
|
||||||
|
//
|
||||||
|
this.DebugCheckBox.AutoSize = true;
|
||||||
|
this.DebugCheckBox.Location = new System.Drawing.Point(6, 21);
|
||||||
|
this.DebugCheckBox.Name = "DebugCheckBox";
|
||||||
|
this.DebugCheckBox.Size = new System.Drawing.Size(153, 17);
|
||||||
|
this.DebugCheckBox.TabIndex = 0;
|
||||||
|
this.DebugCheckBox.Text = "Display Debug messages";
|
||||||
|
this.DebugCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.DebugCheckBox.CheckedChanged += new System.EventHandler(this.DebugCheckBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// VerboseCheckBox
|
||||||
|
//
|
||||||
|
this.VerboseCheckBox.AutoSize = true;
|
||||||
|
this.VerboseCheckBox.Location = new System.Drawing.Point(6, 44);
|
||||||
|
this.VerboseCheckBox.Name = "VerboseCheckBox";
|
||||||
|
this.VerboseCheckBox.Size = new System.Drawing.Size(197, 17);
|
||||||
|
this.VerboseCheckBox.TabIndex = 1;
|
||||||
|
this.VerboseCheckBox.Text = "Display Verbose debug messages";
|
||||||
|
this.VerboseCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.VerboseCheckBox.CheckedChanged += new System.EventHandler(this.VerboseCheckBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.label8);
|
||||||
|
this.groupBox1.Controls.Add(this.label9);
|
||||||
|
this.groupBox1.Controls.Add(this.textBox2);
|
||||||
|
this.groupBox1.Controls.Add(this.label5);
|
||||||
|
this.groupBox1.Controls.Add(this.label4);
|
||||||
|
this.groupBox1.Controls.Add(this.textBox3);
|
||||||
|
this.groupBox1.Controls.Add(this.label3);
|
||||||
|
this.groupBox1.Controls.Add(this.label2);
|
||||||
|
this.groupBox1.Controls.Add(this.label1);
|
||||||
|
this.groupBox1.Controls.Add(this.LossTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MinLatencyTextBox);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(291, 12);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(300, 110);
|
||||||
|
this.groupBox1.TabIndex = 2;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Simulation";
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Location = new System.Drawing.Point(163, 80);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(16, 13);
|
||||||
|
this.label8.TabIndex = 10;
|
||||||
|
this.label8.Text = "%";
|
||||||
|
//
|
||||||
|
// label9
|
||||||
|
//
|
||||||
|
this.label9.AutoSize = true;
|
||||||
|
this.label9.Location = new System.Drawing.Point(6, 80);
|
||||||
|
this.label9.Name = "label9";
|
||||||
|
this.label9.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.label9.TabIndex = 9;
|
||||||
|
this.label9.Text = "Duplicates";
|
||||||
|
//
|
||||||
|
// textBox2
|
||||||
|
//
|
||||||
|
this.textBox2.Location = new System.Drawing.Point(103, 77);
|
||||||
|
this.textBox2.Name = "textBox2";
|
||||||
|
this.textBox2.Size = new System.Drawing.Size(54, 22);
|
||||||
|
this.textBox2.TabIndex = 8;
|
||||||
|
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(163, 52);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(16, 13);
|
||||||
|
this.label5.TabIndex = 7;
|
||||||
|
this.label5.Text = "%";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(247, 24);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(21, 13);
|
||||||
|
this.label4.TabIndex = 6;
|
||||||
|
this.label4.Text = "ms";
|
||||||
|
//
|
||||||
|
// textBox3
|
||||||
|
//
|
||||||
|
this.textBox3.Location = new System.Drawing.Point(185, 21);
|
||||||
|
this.textBox3.Name = "textBox3";
|
||||||
|
this.textBox3.Size = new System.Drawing.Size(54, 22);
|
||||||
|
this.textBox3.TabIndex = 5;
|
||||||
|
this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(163, 24);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(18, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "to";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(6, 52);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(29, 13);
|
||||||
|
this.label2.TabIndex = 3;
|
||||||
|
this.label2.Text = "Loss";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(6, 24);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(91, 13);
|
||||||
|
this.label1.TabIndex = 2;
|
||||||
|
this.label1.Text = "One way latency";
|
||||||
|
//
|
||||||
|
// LossTextBox
|
||||||
|
//
|
||||||
|
this.LossTextBox.Location = new System.Drawing.Point(103, 49);
|
||||||
|
this.LossTextBox.Name = "LossTextBox";
|
||||||
|
this.LossTextBox.Size = new System.Drawing.Size(54, 22);
|
||||||
|
this.LossTextBox.TabIndex = 1;
|
||||||
|
this.LossTextBox.TextChanged += new System.EventHandler(this.LossTextBox_TextChanged);
|
||||||
|
//
|
||||||
|
// MinLatencyTextBox
|
||||||
|
//
|
||||||
|
this.MinLatencyTextBox.Location = new System.Drawing.Point(103, 21);
|
||||||
|
this.MinLatencyTextBox.Name = "MinLatencyTextBox";
|
||||||
|
this.MinLatencyTextBox.Size = new System.Drawing.Size(54, 22);
|
||||||
|
this.MinLatencyTextBox.TabIndex = 0;
|
||||||
|
this.MinLatencyTextBox.TextChanged += new System.EventHandler(this.MinLatencyTextBox_TextChanged);
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.label7);
|
||||||
|
this.groupBox2.Controls.Add(this.DebugCheckBox);
|
||||||
|
this.groupBox2.Controls.Add(this.VerboseCheckBox);
|
||||||
|
this.groupBox2.Controls.Add(this.label6);
|
||||||
|
this.groupBox2.Controls.Add(this.textBox1);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(273, 110);
|
||||||
|
this.groupBox2.TabIndex = 3;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Settings";
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.Location = new System.Drawing.Point(182, 70);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(21, 13);
|
||||||
|
this.label7.TabIndex = 10;
|
||||||
|
this.label7.Text = "ms";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(6, 70);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(84, 13);
|
||||||
|
this.label6.TabIndex = 9;
|
||||||
|
this.label6.Text = "Ping frequency";
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
this.textBox1.Location = new System.Drawing.Point(98, 67);
|
||||||
|
this.textBox1.Name = "textBox1";
|
||||||
|
this.textBox1.Size = new System.Drawing.Size(76, 22);
|
||||||
|
this.textBox1.TabIndex = 8;
|
||||||
|
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button1.Location = new System.Drawing.Point(494, 367);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(101, 36);
|
||||||
|
this.button1.TabIndex = 5;
|
||||||
|
this.button1.Text = "Refresh";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// groupBox3
|
||||||
|
//
|
||||||
|
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.groupBox3.Controls.Add(this.StatisticsLabel);
|
||||||
|
this.groupBox3.Location = new System.Drawing.Point(12, 128);
|
||||||
|
this.groupBox3.Name = "groupBox3";
|
||||||
|
this.groupBox3.Size = new System.Drawing.Size(579, 233);
|
||||||
|
this.groupBox3.TabIndex = 6;
|
||||||
|
this.groupBox3.TabStop = false;
|
||||||
|
this.groupBox3.Text = "Statistics";
|
||||||
|
//
|
||||||
|
// StatisticsLabel
|
||||||
|
//
|
||||||
|
this.StatisticsLabel.AutoSize = true;
|
||||||
|
this.StatisticsLabel.Location = new System.Drawing.Point(6, 22);
|
||||||
|
this.StatisticsLabel.Name = "StatisticsLabel";
|
||||||
|
this.StatisticsLabel.Size = new System.Drawing.Size(79, 13);
|
||||||
|
this.StatisticsLabel.TabIndex = 0;
|
||||||
|
this.StatisticsLabel.Text = "StatisticsLabel";
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button2.Location = new System.Drawing.Point(389, 367);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(99, 36);
|
||||||
|
this.button2.TabIndex = 7;
|
||||||
|
this.button2.Text = "Close";
|
||||||
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
|
//
|
||||||
|
// NetPeerSettingsWindow
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(603, 411);
|
||||||
|
this.Controls.Add(this.button2);
|
||||||
|
this.Controls.Add(this.groupBox3);
|
||||||
|
this.Controls.Add(this.button1);
|
||||||
|
this.Controls.Add(this.groupBox2);
|
||||||
|
this.Controls.Add(this.groupBox1);
|
||||||
|
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.Name = "NetPeerSettingsWindow";
|
||||||
|
this.Text = "NetPeerSettingsWindow1";
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.groupBox3.ResumeLayout(false);
|
||||||
|
this.groupBox3.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
public System.Windows.Forms.CheckBox DebugCheckBox;
|
||||||
|
public System.Windows.Forms.CheckBox VerboseCheckBox;
|
||||||
|
public System.Windows.Forms.TextBox LossTextBox;
|
||||||
|
public System.Windows.Forms.TextBox MinLatencyTextBox;
|
||||||
|
public System.Windows.Forms.TextBox textBox3;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.TextBox textBox1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox3;
|
||||||
|
public System.Windows.Forms.Label StatisticsLabel;
|
||||||
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Label label9;
|
||||||
|
public System.Windows.Forms.TextBox textBox2;
|
||||||
|
}
|
||||||
|
}
|
||||||
158
Samples/SamplesCommon/NetPeerSettingsWindow.cs
Normal file
158
Samples/SamplesCommon/NetPeerSettingsWindow.cs
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
using Lidgren.Network;
|
||||||
|
|
||||||
|
namespace SamplesCommon
|
||||||
|
{
|
||||||
|
public partial class NetPeerSettingsWindow : Form
|
||||||
|
{
|
||||||
|
public NetPeer Peer;
|
||||||
|
public Timer timer;
|
||||||
|
|
||||||
|
public NetPeerSettingsWindow(string title, NetPeer peer)
|
||||||
|
{
|
||||||
|
Peer = peer;
|
||||||
|
InitializeComponent();
|
||||||
|
RefreshData();
|
||||||
|
this.Text = title;
|
||||||
|
|
||||||
|
// auto refresh now and then
|
||||||
|
timer = new Timer();
|
||||||
|
timer.Interval = 250;
|
||||||
|
timer.Tick += new EventHandler(timer_Tick);
|
||||||
|
timer.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnClosed(EventArgs e)
|
||||||
|
{
|
||||||
|
timer.Enabled = false;
|
||||||
|
base.OnClosed(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void timer_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshData()
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
LossTextBox.Text = ((int)(Peer.Configuration.SimulatedLoss * 100)).ToString();
|
||||||
|
textBox2.Text = ((int)(Peer.Configuration.SimulatedDuplicatesChance * 100)).ToString();
|
||||||
|
MinLatencyTextBox.Text = ((int)(Peer.Configuration.SimulatedMinimumLatency * 1000)).ToString();
|
||||||
|
textBox3.Text = ((int)((Peer.Configuration.SimulatedMinimumLatency + Peer.Configuration.SimulatedRandomLatency) * 1000)).ToString();
|
||||||
|
#else
|
||||||
|
LossTextBox.Text = "0";
|
||||||
|
MinLatencyTextBox.Text = "0";
|
||||||
|
textBox3.Text = "0";
|
||||||
|
textBox2.Text = "0";
|
||||||
|
#endif
|
||||||
|
DebugCheckBox.Checked = Peer.Configuration.IsMessageTypeEnabled(NetIncomingMessageType.DebugMessage);
|
||||||
|
VerboseCheckBox.Checked = Peer.Configuration.IsMessageTypeEnabled(NetIncomingMessageType.VerboseDebugMessage);
|
||||||
|
textBox1.Text = (Peer.Configuration.PingInterval * 1000).ToString();
|
||||||
|
//ThrottleTextBox.Text = Peer.Configuration.ThrottleBytesPerSecond.ToString();
|
||||||
|
|
||||||
|
StringBuilder bdr = new StringBuilder();
|
||||||
|
bdr.AppendLine(Peer.Statistics.ToString());
|
||||||
|
|
||||||
|
if (Peer.ConnectionsCount > 0)
|
||||||
|
{
|
||||||
|
NetConnection conn = Peer.Connections[0];
|
||||||
|
bdr.AppendLine("Connection 0:");
|
||||||
|
//bdr.AppendLine("Average RTT: " + ((int)(conn.AverageRoundtripTime * 1000.0f)) + " ms");
|
||||||
|
//bdr.AppendLine("Last response: " + (int)(NetTime.Now - conn.Statistics.LastSendRespondedTo) + "s ago");
|
||||||
|
//bdr.AppendLine("Most sends: " + conn.Statistics.MostSends);
|
||||||
|
bdr.Append(conn.Statistics.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
StatisticsLabel.Text = bdr.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DebugCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Peer.Configuration.SetMessageTypeEnabled(NetIncomingMessageType.DebugMessage, DebugCheckBox.Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VerboseCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Peer.Configuration.SetMessageTypeEnabled(NetIncomingMessageType.VerboseDebugMessage, VerboseCheckBox.Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LossTextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
float ms;
|
||||||
|
if (Single.TryParse(LossTextBox.Text, out ms))
|
||||||
|
Peer.Configuration.SimulatedLoss = (float)((double)ms / 100.0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBox2_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
float ms;
|
||||||
|
if (Single.TryParse(textBox2.Text, out ms))
|
||||||
|
Peer.Configuration.SimulatedDuplicatesChance = (float)((double)ms / 100.0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MinLatencyTextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
float min;
|
||||||
|
if (float.TryParse(MinLatencyTextBox.Text, out min))
|
||||||
|
Peer.Configuration.SimulatedMinimumLatency = (float)(min / 1000.0);
|
||||||
|
MinLatencyTextBox.Text = ((int)(Peer.Configuration.SimulatedMinimumLatency * 1000)).ToString();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBox3_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
float max;
|
||||||
|
if (float.TryParse(textBox3.Text, out max))
|
||||||
|
{
|
||||||
|
max = (float)((double)max / 1000.0);
|
||||||
|
float r = max - Peer.Configuration.SimulatedMinimumLatency;
|
||||||
|
if (r > 0)
|
||||||
|
{
|
||||||
|
Peer.Configuration.SimulatedRandomLatency = r;
|
||||||
|
double nm = (double)Peer.Configuration.SimulatedMinimumLatency + (double)Peer.Configuration.SimulatedRandomLatency;
|
||||||
|
textBox3.Text = ((int)(max * 1000)).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
float d;
|
||||||
|
if (float.TryParse(textBox1.Text, out d))
|
||||||
|
Peer.Configuration.PingInterval = (float)(d / 1000.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ThrottleTextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//uint bps;
|
||||||
|
//if (UInt32.TryParse(ThrottleTextBox.Text, out bps))
|
||||||
|
// Peer.Configuration.ThrottleBytesPerSecond = (int)bps;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Samples/SamplesCommon/NetPeerSettingsWindow.resx
Normal file
120
Samples/SamplesCommon/NetPeerSettingsWindow.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
36
Samples/SamplesCommon/Properties/AssemblyInfo.cs
Normal file
36
Samples/SamplesCommon/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("SamplesCommon")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Microsoft")]
|
||||||
|
[assembly: AssemblyProduct("SamplesCommon")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("7d1622f4-1dc7-4e94-8ec0-0a2a295dcf9a")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
80
Samples/SamplesCommon/SamplesCommon.csproj
Normal file
80
Samples/SamplesCommon/SamplesCommon.csproj
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>9.0.21022</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{773069DA-B66E-4667-ADCB-0D215AD8CF3E}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>SamplesCommon</RootNamespace>
|
||||||
|
<AssemblyName>SamplesCommon</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>
|
||||||
|
</SccProjectName>
|
||||||
|
<SccLocalPath>
|
||||||
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="NativeMethods.cs" />
|
||||||
|
<Compile Include="NetPeerSettingsWindow.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NetPeerSettingsWindow.Designer.cs">
|
||||||
|
<DependentUpon>NetPeerSettingsWindow.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="NetPeerSettingsWindow.resx">
|
||||||
|
<DependentUpon>NetPeerSettingsWindow.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Lidgren.Network\Lidgren.Network.csproj">
|
||||||
|
<Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
|
||||||
|
<Name>Lidgren.Network</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
@@ -12,10 +12,14 @@
|
|||||||
<AssemblyName>UnitTests</AssemblyName>
|
<AssemblyName>UnitTests</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
</SccProjectName>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccLocalPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
BIN
lidgren-network-gen3-backup.7z
Normal file
BIN
lidgren-network-gen3-backup.7z
Normal file
Binary file not shown.
Reference in New Issue
Block a user