This commit is contained in:
2025-11-24 14:19:51 +05:30
commit f5c1412b28
6734 changed files with 1527575 additions and 0 deletions

View File

@ -0,0 +1,582 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{61A4B9B1-7FBF-404A-BFDD-B1C10853F12E}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSharpTestApp_RakNetCompat</RootNamespace>
<AssemblyName>CSharpTestApp_RakNetCompat</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug - Unicode|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug - Unicode\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release - Unicode|x86'">
<OutputPath>bin\x86\Release - Unicode\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Retail|x86'">
<OutputPath>bin\x86\Retail\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Retail - Unicode|x86'">
<OutputPath>bin\x86\Retail - Unicode\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug - Unicode|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug - Unicode\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release - Unicode|x64'">
<OutputPath>bin\x64\Release - Unicode\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Retail|x64'">
<OutputPath>bin\x64\Retail\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Retail - Unicode|x64'">
<OutputPath>bin\x64\Retail - Unicode\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\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>
-->
<ItemGroup>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\AddressOrGUID.cs">
<Link>bindings\AddressOrGUID.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\BitStream.cs">
<Link>bindings\BitStream.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ByteQueue.cs">
<Link>bindings\ByteQueue.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Cell.cs">
<Link>bindings\Cell.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ColumnDescriptor.cs">
<Link>bindings\ColumnDescriptor.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\CommandParserInterface.cs">
<Link>bindings\CommandParserInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ConnectionAttemptResult.cs">
<Link>bindings\ConnectionAttemptResult.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ConnectionGraph2.cs">
<Link>bindings\ConnectionGraph2.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ConnectionState.cs">
<Link>bindings\ConnectionState.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\DefaultMessageIDTypes.cs">
<Link>bindings\DefaultMessageIDTypes.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\DirectoryDeltaTransfer.cs">
<Link>bindings\DirectoryDeltaTransfer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\DownloadCompleteStruct.cs">
<Link>bindings\DownloadCompleteStruct.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileList.cs">
<Link>bindings\FileList.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileListNode.cs">
<Link>bindings\FileListNode.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileListNodeContext.cs">
<Link>bindings\FileListNodeContext.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileListProgress.cs">
<Link>bindings\FileListProgress.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileListTransfer.cs">
<Link>bindings\FileListTransfer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileListTransferCBInterface.cs">
<Link>bindings\FileListTransferCBInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FileProgressStruct.cs">
<Link>bindings\FileProgressStruct.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FilterQuery.cs">
<Link>bindings\FilterQuery.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FLP_Printf.cs">
<Link>bindings\FLP_Printf.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\FullyConnectedMesh2.cs">
<Link>bindings\FullyConnectedMesh2.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\IncrementalReadInterface.cs">
<Link>bindings\IncrementalReadInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\JoinTeamType.cs">
<Link>bindings\JoinTeamType.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\LogCommandParser.cs">
<Link>bindings\LogCommandParser.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\MessageFilter.cs">
<Link>bindings\MessageFilter.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\MultilistType.cs">
<Link>bindings\MultilistType.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughClient.cs">
<Link>bindings\NatPunchthroughClient.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughDebugInterface.cs">
<Link>bindings\NatPunchthroughDebugInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughDebugInterface_PacketLogger.cs">
<Link>bindings\NatPunchthroughDebugInterface_PacketLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughDebugInterface_Printf.cs">
<Link>bindings\NatPunchthroughDebugInterface_Printf.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughServer.cs">
<Link>bindings\NatPunchthroughServer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughServerDebugInterface.cs">
<Link>bindings\NatPunchthroughServerDebugInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughServerDebugInterface_PacketLogger.cs">
<Link>bindings\NatPunchthroughServerDebugInterface_PacketLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatPunchthroughServerDebugInterface_Printf.cs">
<Link>bindings\NatPunchthroughServerDebugInterface_Printf.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatTypeDetectionClient.cs">
<Link>bindings\NatTypeDetectionClient.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NatTypeDetectionServer.cs">
<Link>bindings\NatTypeDetectionServer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NetworkIDManager.cs">
<Link>bindings\NetworkIDManager.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\NetworkIDObject.cs">
<Link>bindings\NetworkIDObject.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\OnFileStruct.cs">
<Link>bindings\OnFileStruct.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\OutOfBandIdentifiers.cs">
<Link>bindings\OutOfBandIdentifiers.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Packet.cs">
<Link>bindings\Packet.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PacketConsoleLogger.cs">
<Link>bindings\PacketConsoleLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PacketFileLogger.cs">
<Link>bindings\PacketFileLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PacketLogger.cs">
<Link>bindings\PacketLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PacketPriority.cs">
<Link>bindings\PacketPriority.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PacketReliability.cs">
<Link>bindings\PacketReliability.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PluginInterface2.cs">
<Link>bindings\PluginInterface2.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PluginReceiveResult.cs">
<Link>bindings\PluginReceiveResult.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PublicKey.cs">
<Link>bindings\PublicKey.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PublicKeyMode.cs">
<Link>bindings\PublicKeyMode.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\PunchthroughConfiguration.cs">
<Link>bindings\PunchthroughConfiguration.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNet.cs">
<Link>bindings\RakNet.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetBPlusTreeRow.cs">
<Link>bindings\RakNetBPlusTreeRow.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetGUID.cs">
<Link>bindings\RakNetGUID.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListCell.cs">
<Link>bindings\RakNetListCell.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListCellPointer.cs">
<Link>bindings\RakNetListCellPointer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListColumnDescriptor.cs">
<Link>bindings\RakNetListColumnDescriptor.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListFileListNode.cs">
<Link>bindings\RakNetListFileListNode.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListFilterQuery.cs">
<Link>bindings\RakNetListFilterQuery.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListRakNetGUID.cs">
<Link>bindings\RakNetListRakNetGUID.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListRakString.cs">
<Link>bindings\RakNetListRakString.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListSortQuery.cs">
<Link>bindings\RakNetListSortQuery.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListSystemAddress.cs">
<Link>bindings\RakNetListSystemAddress.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListTableRow.cs">
<Link>bindings\RakNetListTableRow.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListUnsignedInt.cs">
<Link>bindings\RakNetListUnsignedInt.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetListUnsignedShort.cs">
<Link>bindings\RakNetListUnsignedShort.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetPageRow.cs">
<Link>bindings\RakNetPageRow.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetPINVOKE.cs">
<Link>bindings\RakNetPINVOKE.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakNetStatistics.cs">
<Link>bindings\RakNetStatistics.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakPeer.cs">
<Link>bindings\RakPeer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakPeerInterface.cs">
<Link>bindings\RakPeerInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakString.cs">
<Link>bindings\RakString.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RakWString.cs">
<Link>bindings\RakWString.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ReadyEvent.cs">
<Link>bindings\ReadyEvent.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ReadyEventSystemStatus.cs">
<Link>bindings\ReadyEventSystemStatus.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RemoteSystemIndex.cs">
<Link>bindings\RemoteSystemIndex.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\RNSPerSecondMetrics.cs">
<Link>bindings\RNSPerSecondMetrics.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Router2.cs">
<Link>bindings\Router2.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Router2DebugInterface.cs">
<Link>bindings\Router2DebugInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Row.cs">
<Link>bindings\Row.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SimpleMutex.cs">
<Link>bindings\SimpleMutex.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SocketDescriptor.cs">
<Link>bindings\SocketDescriptor.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SortQuery.cs">
<Link>bindings\SortQuery.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\StartupResult.cs">
<Link>bindings\StartupResult.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_bool.cs">
<Link>bindings\SWIGTYPE_p_bool.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_DataStructures__ListT_RakNetSocket2_p_t.cs">
<Link>bindings\SWIGTYPE_p_DataStructures__ListT_RakNetSocket2_p_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_DataStructures__ListT_RakNet__BitStream_p_t.cs">
<Link>bindings\SWIGTYPE_p_DataStructures__ListT_RakNet__BitStream_p_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_DataStructures__ListT_RakNet__TM_TeamMember_p_t.cs">
<Link>bindings\SWIGTYPE_p_DataStructures__ListT_RakNet__TM_TeamMember_p_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_DataStructures__ListT_RakNet__TM_Team_p_t.cs">
<Link>bindings\SWIGTYPE_p_DataStructures__ListT_RakNet__TM_Team_p_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_double.cs">
<Link>bindings\SWIGTYPE_p_double.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_FILE.cs">
<Link>bindings\SWIGTYPE_p_FILE.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_p_RakNet__TM_Team.cs">
<Link>bindings\SWIGTYPE_p_p_RakNet__TM_Team.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_p_RakNet__TM_TeamMember.cs">
<Link>bindings\SWIGTYPE_p_p_RakNet__TM_TeamMember.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_p_RakNet__TM_World.cs">
<Link>bindings\SWIGTYPE_p_p_RakNet__TM_World.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_p_wchar_t.cs">
<Link>bindings\SWIGTYPE_p_p_wchar_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_RakNet__NatPunchthroughClient__SendPing.cs">
<Link>bindings\SWIGTYPE_p_RakNet__NatPunchthroughClient__SendPing.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_RakNet__ReadyEvent__RemoteSystem.cs">
<Link>bindings\SWIGTYPE_p_RakNet__ReadyEvent__RemoteSystem.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_RakNet__TCPInterface.cs">
<Link>bindings\SWIGTYPE_p_RakNet__TCPInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_RakNet__TM_World__JoinRequestHelper.cs">
<Link>bindings\SWIGTYPE_p_RakNet__TM_World__JoinRequestHelper.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_RNS2RecvStruct.cs">
<Link>bindings\SWIGTYPE_p_RNS2RecvStruct.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_unsigned_char.cs">
<Link>bindings\SWIGTYPE_p_unsigned_char.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_unsigned_int.cs">
<Link>bindings\SWIGTYPE_p_unsigned_int.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_unsigned_long_long.cs">
<Link>bindings\SWIGTYPE_p_unsigned_long_long.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_unsigned_short.cs">
<Link>bindings\SWIGTYPE_p_unsigned_short.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_void.cs">
<Link>bindings\SWIGTYPE_p_void.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SWIGTYPE_p_wchar_t.cs">
<Link>bindings\SWIGTYPE_p_wchar_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\SystemAddress.cs">
<Link>bindings\SystemAddress.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\Table.cs">
<Link>bindings\Table.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TeamManager.cs">
<Link>bindings\TeamManager.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TeamSelection.cs">
<Link>bindings\TeamSelection.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\ThreadsafePacketLogger.cs">
<Link>bindings\ThreadsafePacketLogger.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TMTopology.cs">
<Link>bindings\TMTopology.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TM_Team.cs">
<Link>bindings\TM_Team.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TM_TeamMember.cs">
<Link>bindings\TM_TeamMember.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TM_World.cs">
<Link>bindings\TM_World.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\TransportInterface.cs">
<Link>bindings\TransportInterface.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPForwarder.cs">
<Link>bindings\UDPForwarder.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPForwarderResult.cs">
<Link>bindings\UDPForwarderResult.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPProxyClient.cs">
<Link>bindings\UDPProxyClient.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPProxyClientResultHandler.cs">
<Link>bindings\UDPProxyClientResultHandler.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPProxyCoordinator.cs">
<Link>bindings\UDPProxyCoordinator.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPProxyServer.cs">
<Link>bindings\UDPProxyServer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UDPProxyServerResultHandler.cs">
<Link>bindings\UDPProxyServerResultHandler.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\uint24_t.cs">
<Link>bindings\uint24_t.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UnsignedIntPointer.cs">
<Link>bindings\UnsignedIntPointer.cs</Link>
</Compile>
<Compile Include="..\..\..\bindings\raknet_backwards_compatibility\csharp\interfaces\UnsignedShortPointer.cs">
<Link>bindings\UnsignedShortPointer.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestMain.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<PropertyGroup>
<PreBuildEvent>cd "$(ProjectDir)"
call prebuild.bat "$(ConfigurationName)" $(PlatformName)</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,41 @@
/*
* This file was taken from RakNet 4.082 without any modifications.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*/
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("ConsoleApplication2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApplication2")]
[assembly: AssemblyCopyright("Copyright © 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("bfa4bffa-dd43-4e1f-ac92-e157a81e7fa1")]
// 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")]

View File

@ -0,0 +1,439 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
*
* Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.Timers;
using System.IO;
using RakNet;
namespace CSharpTestApp_RakNetCompat
{
class TestMain
{
static void Main(string[] args)
{
if (!File.Exists("RakNet.dll"))
{
Console.WriteLine("The RakNet DLL is missing.\nPress enter to quit.");
Console.Read();
return;
}
try
{
RakString dllCallTest = new RakString();
}
catch (Exception)
{
Console.WriteLine("DLL issue.\nMost likely the provided DLL wasn't build with the C# wrapper file.\nPress enter to quit.");
Console.Read();
return;
}
Packet testPacket;
int loopNumber;
BitStream stringTestSendBitStream = new BitStream();
BitStream rakStringTestSendBitStream = new BitStream();
BitStream receiveBitStream = new BitStream();
String holdingString;
TimeSpan startTimeSpan;
RakString rakStringTest = new RakString();
RakPeerInterface testClient = RakPeer.GetInstance();
testClient.Startup(1, new SocketDescriptor(60000, "127.0.0.1"), 1);
RakPeerInterface testServer = RakPeer.GetInstance();
testServer.Startup(1, new SocketDescriptor(60001, "127.0.0.1"), 1);
testServer.SetMaximumIncomingConnections(1);
Console.WriteLine("Send and receive loop using BitStream.\nBitStream read done into RakString");
testClient.Connect("127.0.0.1", 60001, "", 0);
String sendString = "The test string";
stringTestSendBitStream.Write((byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM);
stringTestSendBitStream.Write(sendString);
RakString testRakString = new RakString("Test RakString");
rakStringTestSendBitStream.Write((byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM);
rakStringTestSendBitStream.Write(testRakString);
startTimeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1));
loopNumber = 0;
while (startTimeSpan.TotalSeconds + 5 > (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds)
{
testPacket = testServer.Receive();
if (testPacket != null && testPacket.data[0] == (byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM)
{
receiveBitStream.Reset();
receiveBitStream.Write(testPacket.data, testPacket.length);
receiveBitStream.IgnoreBytes(1);
receiveBitStream.Read(rakStringTest);
Console.WriteLine("Loop number: " + loopNumber + "\nData: " + rakStringTest.C_String());
}
testServer.DeallocatePacket(testPacket);
loopNumber++;
System.Threading.Thread.Sleep(50);
testClient.Send(rakStringTestSendBitStream, PacketPriority.LOW_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, new AddressOrGUID(new SystemAddress("127.0.0.1", 60001)), false);
}
Console.WriteLine("String send and receive loop using BitStream.\nBitStream read done into String");
SystemAddress[] remoteSystems;
ushort numberOfSystems=1;
testServer.GetConnectionList(out remoteSystems, ref numberOfSystems);
startTimeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1));
loopNumber = 0;
while (startTimeSpan.TotalSeconds + 5 > (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds)
{
testPacket = testServer.Receive();
if (testPacket != null && testPacket.data[0] == (byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM)
{
receiveBitStream.Reset();
receiveBitStream.Write(testPacket.data, testPacket.length);
receiveBitStream.IgnoreBytes(1);
receiveBitStream.Read(out holdingString);
Console.WriteLine("Loop number: " + loopNumber + "\nData: " + holdingString);
}
testServer.DeallocatePacket(testPacket);
loopNumber++;
System.Threading.Thread.Sleep(50);
SystemAddress sa = RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS;
testClient.Send(stringTestSendBitStream, PacketPriority.LOW_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, new AddressOrGUID(new SystemAddress("127.0.0.1", 60001)), false);
}
//If RakString is not freed before program exit it will crash
rakStringTest.Dispose();
testRakString.Dispose();
RakPeer.DestroyInstance(testClient);
RakPeer.DestroyInstance(testServer);
Console.WriteLine("Demo complete. Press Enter.");
Console.Read();
}
}
#if AUTOPATCHERMYSQLTESTS
private static int TestAutoPatcherClient()
{
//Stick the restarter path here
String restarterPath = "C:\\Rak4\\Samples\\AutopatcherClientRestarter\\Debug\\AutopatcherClientRestarter.exe";
TestCB transferCallback = new TestCB();
Console.Write("A simple client interface for the advanced autopatcher.\n");
Console.Write("Use DirectoryDeltaTransfer for a simpler version of an autopatcher.\n");
Console.Write("Difficulty: Intermediate\n\n");
Console.Write("Client starting...");
SystemAddress serverAddress = RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS;
AutopatcherClient autopatcherClient = new AutopatcherClient();
FileListTransfer fileListTransfer = new FileListTransfer();
autopatcherClient.SetFileListTransferPlugin(fileListTransfer);
RakPeerInterface rakPeer;
rakPeer = RakPeerInterface.GetInstance();
SocketDescriptor socketDescriptor = new SocketDescriptor(0, null);
rakPeer.Startup(1, socketDescriptor, 1);
// Plugin will send us downloading progress notifications if a file is split to fit under the MTU 10 or more times
rakPeer.SetSplitMessageProgressInterval(10);
rakPeer.AttachPlugin(autopatcherClient);
rakPeer.AttachPlugin(fileListTransfer);
Console.Write("started\n");
String buff;
Console.Write("Enter server IP: ");
buff = Console.ReadLine();
if (buff == "")
buff = "127.0.0.1";
rakPeer.Connect(buff, 60000, null, 0);
Console.Write("Connecting...\n");
String appDir;
Console.Write("Enter application directory: ");
appDir = Console.ReadLine();
if (appDir == "")
{
appDir = "C:/temp2";
}
String appName;
Console.Write("Enter application name: ");
appName = Console.ReadLine();
if (appName == "")
appName = "TestApp";
bool patchImmediately = false;
if (patchImmediately == false)
Console.Write("Hit 'q' to quit, 'p' to patch, 'c' to cancel the patch. 'r' to reconnect. 'd' to disconnect.\n");
else
Console.Write("Hit 'q' to quit, 'c' to cancel the patch.\n");
char ch;
Packet p;
while (true)
{
p = rakPeer.Receive();
while (p != null)
{
if (p.data[0] == (byte)DefaultMessageIDTypes.ID_DISCONNECTION_NOTIFICATION)
Console.Write("ID_DISCONNECTION_NOTIFICATION\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_CONNECTION_LOST)
Console.Write("ID_CONNECTION_LOST\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_CONNECTION_REQUEST_ACCEPTED)
{
Console.Write("ID_CONNECTION_REQUEST_ACCEPTED\n");
serverAddress = p.systemAddress;
}
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_CONNECTION_ATTEMPT_FAILED)
Console.Write("ID_CONNECTION_ATTEMPT_FAILED\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
{
//String buff;
//BitStream temp = new BitStream(p.data, p.length, false);
//temp.IgnoreBits(8);
//StringCompressor.Instance().DecodeString(buff, 256, temp);
//Console.Write("ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR\n");
//Console.Write("%s\n", buff);
}
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_AUTOPATCHER_FINISHED)
Console.Write("ID_AUTOPATCHER_FINISHED\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_AUTOPATCHER_RESTART_APPLICATION)
Console.Write("Launch \"AutopatcherClientRestarter.exe autopatcherRestart.txt\"\nQuit this application immediately after to unlock files.\n");
rakPeer.DeallocatePacket(p);
p = rakPeer.Receive();
}
if (Console.KeyAvailable)
ch = Console.ReadKey().KeyChar;
else
ch = (char)0;
if (ch == 'q')
break;
else if (ch == 'r')
{
rakPeer.Connect(buff, 60000, null, 0);
}
else if (ch == 'd')
{
rakPeer.CloseConnection(serverAddress, true);
}
else if (ch == 'p' || (serverAddress != RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS && patchImmediately == true))
{
patchImmediately = false;
String lastUpdateDate;
String restartFile;
restartFile = appDir;
restartFile += "/autopatcherRestart.txt";
// Console.Write("Enter last update date (only newer updates retrieved) or nothing to get all updates\n");
// lastUpdateDate = Console.ReadLine();
lastUpdateDate = "";
if (autopatcherClient.PatchApplication(appName, appDir, lastUpdateDate, serverAddress, transferCallback, restartFile, restarterPath))
{
Console.Write("Patching process starting.\n");
}
else
{
Console.Write("Failed to start patching.\n");
}
}
else if (ch == 'c')
{
autopatcherClient.Clear();
Console.Write("Autopatcher cleared.\n");
}
Thread.Sleep(30);
}
// Dereference so the destructor doesn't crash
autopatcherClient.SetFileListTransferPlugin(null);
rakPeer.Shutdown(500, 0);
RakPeerInterface.DestroyInstance(rakPeer);
return 1;
}
private static void TestAutoPatcherServer()
{
TimeSpan startTimeSpan;
// Avoids the Error: Got a packet bigger than 'max_allowed_packet' bytes
Console.Write("Important: Requires that you first set the DB schema and the max packet size on the server.\n");
Console.Write("See DependentExtensions/AutopatcherMySQLRepository/readme.txt\n");
Console.Write("Server starting... ");
AutopatcherServer autopatcherServer = new AutopatcherServer();
FLP_Printf progressIndicator = new FLP_Printf();
FileListTransfer fileListTransfer = new FileListTransfer();
// So only one thread runs per connection, we create an array of connection objects, and tell the autopatcher server to use one thread per item
const int sqlConnectionObjectCount = 4;
AutopatcherMySQLRepository[] connectionObject = new AutopatcherMySQLRepository[sqlConnectionObjectCount];
AutopatcherRepositoryInterface[] connectionObjectAddresses = new AutopatcherRepositoryInterface[sqlConnectionObjectCount];
for (int i = 0; i < sqlConnectionObjectCount; i++)
{
connectionObject[i] = new AutopatcherMySQLRepository();
connectionObjectAddresses[i] = connectionObject[i];
}
fileListTransfer.SetCallback(progressIndicator);
autopatcherServer.SetFileListTransferPlugin(fileListTransfer);
RakPeerInterface rakPeer;
rakPeer = RakPeerInterface.GetInstance();
SocketDescriptor socketDescriptor = new SocketDescriptor((ushort)LISTEN_PORT, null);
rakPeer.Startup(8, socketDescriptor, 1);
rakPeer.SetMaximumIncomingConnections(MAX_INCOMING_CONNECTIONS);
rakPeer.AttachPlugin(autopatcherServer);
rakPeer.AttachPlugin(fileListTransfer);
Console.Write("started.\n");
Console.Write("Enter database password:\n");
String password;
String username = "root";
password = Console.ReadLine();
if (password == "")
password = "aaaa";
string db;
Console.Write("Enter DB schema: ");
// To create the schema, go to the command line client and type create schema autopatcher;
// You also have to add
// max_allowed_packet=128M
// Where 128 is the maximum size file in megabytes you'll ever add
// to MySQL\MySQL Server 5.1\my.ini in the [mysqld] section
// Be sure to restart the service after doing so
db = Console.ReadLine(); ;
if (db == "")
db = "autopatcher";
for (int conIdx = 0; conIdx < sqlConnectionObjectCount; conIdx++)
{
if (!connectionObject[conIdx].Connect("localhost", username, password, db, 0, null, 0))
{
Console.Write("Database connection failed.\n");
return;
}
}
Console.Write("Database connection suceeded.\n");
Console.Write("Starting threads\n");
autopatcherServer.StartThreads(sqlConnectionObjectCount, connectionObjectAddresses);
Console.Write("System ready for connections\n");
Console.Write("(D)rop database\n(C)reate database.\n(A)dd application\n(U)pdate revision.\n(R)emove application\n(Q)uit\n");
char ch;
Packet p;
while (true)
{
p = rakPeer.Receive();
while (p != null)
{
if (p.data[0] == (byte)DefaultMessageIDTypes.ID_NEW_INCOMING_CONNECTION)
Console.Write("ID_NEW_INCOMING_CONNECTION\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_DISCONNECTION_NOTIFICATION)
Console.Write("ID_DISCONNECTION_NOTIFICATION\n");
else if (p.data[0] == (byte)DefaultMessageIDTypes.ID_CONNECTION_LOST)
Console.Write("ID_CONNECTION_LOST\n");
rakPeer.DeallocatePacket(p);
p = rakPeer.Receive();
}
if (Console.KeyAvailable)
{
ch = Console.ReadKey().KeyChar;
if (ch == 'q')
break;
else if (ch == 'c')
{
if (connectionObject[0].CreateAutopatcherTables() == false)
Console.Write("Error: %s\n", connectionObject[0].GetLastError());
else
Console.Write("Created\n");
}
else if (ch == 'd')
{
if (connectionObject[0].DestroyAutopatcherTables() == false)
Console.Write("Error: %s\n", connectionObject[0].GetLastError());
else
Console.Write("Destroyed\n");
}
else if (ch == 'a')
{
Console.Write("Enter application name to add: ");
string appName;
appName = Console.ReadLine(); ;
if (appName == "")
appName = "TestApp";
if (connectionObject[0].AddApplication(appName, username) == false)
Console.Write("Error: %s\n", connectionObject[0].GetLastError());
else
Console.Write("Done\n");
}
else if (ch == 'r')
{
Console.Write("Enter application name to remove: ");
string appName;
appName = Console.ReadLine(); ;
if (appName == "")
appName = "TestApp";
if (connectionObject[0].RemoveApplication(appName) == false)
Console.Write("Error: %s\n", connectionObject[0].GetLastError());
else
Console.Write("Done\n");
}
else if (ch == 'u')
{
Console.Write("Enter application name: ");
string appName;
appName = Console.ReadLine(); ;
if (appName == "")
appName = "TestApp";
Console.Write("Enter application directory: ");
string appDir;
appDir = Console.ReadLine(); ;
if (appDir == "")
appDir = "C:/temp";
if (connectionObject[0].UpdateApplicationFiles(appName, appDir, username, progressIndicator) == false)
{
Console.Write("Error: %s\n", connectionObject[0].GetLastError());
}
else
{
Console.Write("Update success.\n");
}
}
}
Thread.Sleep(30);
}
RakPeerInterface.DestroyInstance(rakPeer);
}
#endif
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v2.0.50727" sku="Client"/></startup></configuration>

View File

@ -0,0 +1,23 @@
@echo off
REM Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
REM
REM This file is licensed under the MIT-style license found in the license.txt
REM file in the root directory of this source tree.
REM import mandatory parameters
set configuration=%~1
set platform=%2
REM set required variables
set targetDir=bin\x64\%configuration%
REM convert platform parameter
if "%platform%"=="x86" (
set platform=Win32
set targetDir=bin\x86\%configuration%
)
copy "..\..\..\Lib\RakNet_DLL_%configuration%_%platform%.dll" "%targetDir%\RakNet.dll"
exit %ERRORLEVEL%