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,244 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// Common includes
#include <stdio.h>
#include <stdlib.h>
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/StringCompressor.h"
#include "slikenet/FileListTransfer.h"
#include "slikenet/FileList.h" // FLP_Printf
#include "AutopatcherServer.h"
#include "AutopatcherMySQLRepository.h"
#include "slikenet/PacketizedTCP.h"
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#endif
#define USE_TCP
#define LISTEN_PORT 60000
#define MAX_INCOMING_CONNECTIONS 128
int main(int, char **)
{
// Avoids the Error: Got a packet bigger than 'max_allowed_packet' bytes
printf("Important: Requires that you first set the DB schema and the max packet size on the server.\n");
printf("See DependentExtensions/AutopatcherMySQLRepository/readme.txt\n");
// // MySQL is extremely slow in AutopatcherMySQLRepository::GetFilePart
printf("WARNING: MySQL is an order of magnitude slower than PostgreSQL.\nRecommended you use AutopatcherServer_PostgreSQL instead.");
printf("Server starting... ");
SLNet::AutopatcherServer autopatcherServer;
// SLNet::FLP_Printf progressIndicator;
SLNet::FileListTransfer 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
static const int workerThreadCount=4; // Used for checking patches only
static const int sqlConnectionObjectCount=32; // Used for both checking patches and downloading
SLNet::AutopatcherMySQLRepository connectionObject[sqlConnectionObjectCount];
SLNet::AutopatcherRepositoryInterface *connectionObjectAddresses[sqlConnectionObjectCount];
for (int i=0; i < sqlConnectionObjectCount; i++)
connectionObjectAddresses[i]=&connectionObject[i];
// fileListTransfer.AddCallback(&progressIndicator);
autopatcherServer.SetFileListTransferPlugin(&fileListTransfer);
// MySQL is extremely slow in AutopatcherMySQLRepository::GetFilePart so running tho incremental reads in a thread allows multiple concurrent users to read
// Without this, only one user would be sent files at a time basically
fileListTransfer.StartIncrementalReadThreads(sqlConnectionObjectCount);
autopatcherServer.SetMaxConurrentUsers(MAX_INCOMING_CONNECTIONS); // More users than this get queued up
SLNet::AutopatcherServerLoadNotifier_Printf loadNotifier;
autopatcherServer.SetLoadManagementCallback(&loadNotifier);
#ifdef USE_TCP
SLNet::PacketizedTCP packetizedTCP;
if (packetizedTCP.Start(LISTEN_PORT,MAX_INCOMING_CONNECTIONS)==false)
{
printf("Failed to start TCP. Is the port already in use?");
return 1;
}
packetizedTCP.AttachPlugin(&autopatcherServer);
packetizedTCP.AttachPlugin(&fileListTransfer);
#else
SLNet::RakPeerInterface *rakPeer;
rakPeer = SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor socketDescriptor(LISTEN_PORT,0);
rakPeer->Startup(MAX_INCOMING_CONNECTIONS,&socketDescriptor, 1);
rakPeer->SetMaximumIncomingConnections(MAX_INCOMING_CONNECTIONS);
rakPeer->AttachPlugin(&autopatcherServer);
rakPeer->AttachPlugin(&fileListTransfer);
#endif
printf("started.\n");
printf("Enter database password:\n");
char password[128];
char username[256];
strcpy_s(username, "root");
Gets(password,sizeof(password));
if (password[0]==0)
strcpy_s(password,"aaaa");
char db[256];
printf("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
Gets(db,sizeof(db));
if (db[0]==0)
strcpy_s(db,"autopatcher");
for (int conIdx=0; conIdx < sqlConnectionObjectCount; conIdx++)
{
if (!connectionObject[conIdx].Connect("localhost", username, password, db, 0, nullptr, 0))
{
printf("Database connection failed.\n");
return 1;
}
}
printf("Database connection suceeded.\n");
printf("Starting threads\n");
autopatcherServer.StartThreads(workerThreadCount, sqlConnectionObjectCount, connectionObjectAddresses);
printf("System ready for connections\n");
printf("(D)rop database\n(C)reate database.\n(A)dd application\n(U)pdate revision.\n(R)emove application\n(Q)uit\n");
int ch;
SLNet::Packet *p;
for(;;)
{
#ifdef USE_TCP
SLNet::SystemAddress notificationAddress;
notificationAddress=packetizedTCP.HasCompletedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
notificationAddress=packetizedTCP.HasNewIncomingConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_NEW_INCOMING_CONNECTION\n");
notificationAddress=packetizedTCP.HasLostConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_LOST\n");
p=packetizedTCP.Receive();
while (p)
{
packetizedTCP.DeallocatePacket(p);
p=packetizedTCP.Receive();
}
#else
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_NEW_INCOMING_CONNECTION)
printf("ID_NEW_INCOMING_CONNECTION\n");
else if (p->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION\n");
else if (p->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST\n");
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
#endif
if (_kbhit())
{
ch=_getch();
if (ch=='q')
break;
else if (ch=='c')
{
if (connectionObject[0].CreateAutopatcherTables()==false)
printf("Error: %s\n", connectionObject[0].GetLastError());
else
printf("Created\n");
}
else if (ch=='d')
{
if (connectionObject[0].DestroyAutopatcherTables()==false)
printf("Error: %s\n", connectionObject[0].GetLastError());
else
printf("Destroyed\n");
}
else if (ch=='a')
{
printf("Enter application name to add: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
if (connectionObject[0].AddApplication(appName, username)==false)
printf("Error: %s\n", connectionObject[0].GetLastError());
else
printf("Done\n");
}
else if (ch=='r')
{
printf("Enter application name to remove: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
if (connectionObject[0].RemoveApplication(appName)==false)
printf("Error: %s\n", connectionObject[0].GetLastError());
else
printf("Done\n");
}
else if (ch=='u')
{
printf("Enter application name: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
printf("Enter application directory: ");
char appDir[512];
Gets(appDir,sizeof(appName));
if (appDir[0]==0)
strcpy_s(appDir, "C:/temp");
if (connectionObject[0].UpdateApplicationFiles(appName, appDir, username, 0)==false)
{
printf("Error: %s\n", connectionObject[0].GetLastError());
}
else
{
printf("Update success.\n");
}
}
}
RakSleep(30);
}
#ifdef USE_TCP
packetizedTCP.Stop();
#else
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
#endif
}

View File

@ -0,0 +1,349 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{01A7ED79-2098-4BB5-B5A0-8293210BCB93}</ProjectGuid>
<RootNamespace>AutopatcherServer_MySQL</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Debug\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Debug - Unicode\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Release\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Retail\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Release - Unicode\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherMySQLRepository;./../../DependentExtensions/MySQLInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;__WIN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherMySQLRepository\Retail - Unicode\AutopatcherMySQLRepository.lib;C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="AutopatcherServerTest_MySQL.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DependentExtensions\Autopatcher\AutopatcherMySQLRepository\AutopatcherMySQLRepository.vcxproj">
<Project>{9092c339-3cca-41b4-8b80-faed313d4168}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="BZip">
<UniqueIdentifier>{a4af7c46-c772-4239-8e0f-6d1b91c86d1f}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{b64de0b5-0fe8-4b66-865a-e8f21209dde1}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="AutopatcherServerTest_MySQL.cpp">
<Filter>Main</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,35 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project("AutoPatcherServer_MySQL")
IF(WIN32 AND NOT UNIX)
FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/AutopatcherServer.cpp" "${Autopatcher_SOURCE_DIR}/MemoryCompressor.cpp" "${Autopatcher_SOURCE_DIR}/CreatePatch.cpp" "${Autopatcher_SOURCE_DIR}/AutopatcherServer.h")
FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h")
LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c")
SOURCE_GROUP(BZip FILES ${BZSRC})
SOURCE_GROUP("Source Files" FILES ${AUTOSRC})
SOURCE_GROUP(Main "AutopatcherServerTest_MySQL.cpp")
include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR})
add_executable("AutoPatcherServer_MySQL" "AutopatcherServerTest_MySQL.cpp" ${AUTOSRC} ${BZSRC})
target_link_libraries("AutoPatcherServer_MySQL" ${SLIKENET_COMMON_LIBS} AutoPatcherMySQLRepository)
VSUBFOLDER(AutoPatcherServer_MySQL "Samples/AutoPatcher/Server/MySQL")
ELSE(WIN32 AND NOT UNIX)
include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR})
add_executable("AutoPatcherServer_MySQL" "AutopatcherServerTest_MySQL.cpp")
target_link_libraries("AutoPatcherServer_MySQL" ${SLIKENET_COMMON_LIBS} LibAutopatcher AutoPatcherMySQLRepository LibMySQLInterface)
ENDIF(WIN32 AND NOT UNIX)

View File

@ -0,0 +1,326 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherClient</ProjectName>
<ProjectGuid>{0D0A2B9B-1423-484A-8A40-9E67FD72BD4F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp" />
<ClCompile Include="AutopatcherClientTest.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h" />
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Client Files">
<UniqueIdentifier>{cd7f4974-5beb-4d94-8b11-75c7031b02c4}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{858d43c6-f9dc-4b1d-911f-87f10e5fe328}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2">
<UniqueIdentifier>{509dd030-f638-4777-9b8f-049ce14355f1}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2Wrapper">
<UniqueIdentifier>{941ff6d5-5a4f-42aa-a5d4-9d5c93736309}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="AutopatcherClientTest.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>BZip2Wrapper</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>BZip2Wrapper</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,467 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// Common includes
#include <stdio.h>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/StringCompressor.h"
#include "slikenet/PacketizedTCP.h"
// Client only includes
#include "slikenet/FileListTransferCBInterface.h"
#include "slikenet/FileListTransfer.h"
#include "AutopatcherClient.h"
#include "slikenet/AutopatcherPatchContext.h"
#include "slikenet/Gets.h"
#include "slikenet/sleep.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
char WORKING_DIRECTORY[MAX_PATH];
char PATH_TO_XDELTA_EXE[MAX_PATH];
class TestCB : public SLNet::AutopatcherClientCBInterface
{
public:
virtual bool OnFile(OnFileStruct *onFileStruct)
{
if (onFileStruct->context.op==PC_HASH_1_WITH_PATCH || onFileStruct->context.op==PC_HASH_2_WITH_PATCH)
printf("Patched: ");
else if (onFileStruct->context.op==PC_WRITE_FILE)
printf("Written: ");
else if (onFileStruct->context.op==PC_ERROR_FILE_WRITE_FAILURE)
printf("Write Failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_TARGET_MISSING)
printf("Patch target missing: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_APPLICATION_FAILURE)
printf("Patch process failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_RESULT_CHECKSUM_FAILURE)
printf("Patch checksum failure: ");
else if (onFileStruct->context.op==PC_NOTICE_WILL_COPY_ON_RESTART)
printf("Copy pending restart: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED)
printf("Downloaded: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED_PATCH)
printf("Downloaded Patch: ");
else
RakAssert(0);
printf("%i. (100%%) %i/%i %s %ib / %ib\n", onFileStruct->setID, onFileStruct->fileIndex+1, onFileStruct->numberOfFilesInThisSet,
onFileStruct->fileName, onFileStruct->byteLengthOfThisFile,
onFileStruct->byteLengthOfThisSet);
// Return false for the file data to be deallocated automatically
return false;
}
virtual void OnFileProgress(FileProgressStruct *fps)
{
printf("Downloading: %i. (%i%%) %i/%i %s %ib/%ib %ib/%ib total\n", fps->onFileStruct->setID,
(int) (100.0*(double)fps->onFileStruct->bytesDownloadedForThisFile/(double)fps->onFileStruct->byteLengthOfThisFile),
fps->onFileStruct->fileIndex+1, fps->onFileStruct->numberOfFilesInThisSet, fps->onFileStruct->fileName,
fps->onFileStruct->bytesDownloadedForThisFile,
fps->onFileStruct->byteLengthOfThisFile,
fps->onFileStruct->bytesDownloadedForThisSet,
fps->onFileStruct->byteLengthOfThisSet
);
}
virtual PatchContext ApplyPatchBase(const char *oldFilePath, char **newFileContents, unsigned int *newFileSize, char *patchContents, unsigned int patchSize, uint32_t patchAlgorithm)
{
if (patchAlgorithm==0)
{
return ApplyPatchBSDiff(oldFilePath, newFileContents, newFileSize, patchContents, patchSize);
}
else
{
char buff[128];
SLNet::TimeUS time = SLNet::GetTimeUS();
#if defined(_WIN32)
sprintf_s(buff, "%I64u", time);
#else
sprintf_s(buff, "%llu", (long long unsigned int) time);
#endif
char pathToPatch1[MAX_PATH], pathToPatch2[MAX_PATH];
sprintf_s(pathToPatch1, "%s/patchClient_%s.tmp", WORKING_DIRECTORY, buff);
FILE *fpPatch;
if (fopen_s(&fpPatch, pathToPatch1, "wb")!=0)
return PC_ERROR_PATCH_TARGET_MISSING;
fwrite(patchContents, 1, patchSize, fpPatch);
fclose(fpPatch);
// Invoke xdelta
// See https://code.google.com/p/xdelta/wiki/CommandLineSyntax
char commandLine[512];
_snprintf(commandLine, sizeof(commandLine)-1, "-d -f -s %s patchClient_%s.tmp newFile_%s.tmp", oldFilePath, buff, buff);
commandLine[511]=0;
SHELLEXECUTEINFOA shellExecuteInfo;
shellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shellExecuteInfo.fMask = SEE_MASK_NOASYNC | SEE_MASK_NO_CONSOLE;
shellExecuteInfo.hwnd = nullptr;
shellExecuteInfo.lpVerb = "open";
shellExecuteInfo.lpFile = PATH_TO_XDELTA_EXE;
shellExecuteInfo.lpParameters = commandLine;
shellExecuteInfo.lpDirectory = WORKING_DIRECTORY;
shellExecuteInfo.nShow = SW_SHOWNORMAL;
shellExecuteInfo.hInstApp = nullptr;
ShellExecuteExA(&shellExecuteInfo);
// ShellExecute(nullptr, "open", PATH_TO_XDELTA_EXE, commandLine, WORKING_DIRECTORY, SW_SHOWNORMAL);
sprintf_s(pathToPatch2, "%s/newFile_%s.tmp", WORKING_DIRECTORY, buff);
errno_t error = fopen_s(&fpPatch, pathToPatch2, "r+b");
SLNet::TimeUS stopWaiting = time + 60000000;
while (error!=0 && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
error = fopen_s(&fpPatch, pathToPatch2, "r+b");
}
if (error!=0)
{
char buff2[1024];
strerror_s(buff2, errno);
printf("\nERROR: Could not open %s.\nerr=%i (%s)\narguments=%s\n", pathToPatch2, errno, buff2, commandLine);
return PC_ERROR_PATCH_TARGET_MISSING;
}
fseek(fpPatch, 0, SEEK_END);
*newFileSize = ftell(fpPatch);
fseek(fpPatch, 0, SEEK_SET);
*newFileContents = (char*) rakMalloc_Ex(*newFileSize, _FILE_AND_LINE_);
fread(*newFileContents, 1, *newFileSize, fpPatch);
fclose(fpPatch);
int unlinkRes1 = _unlink(pathToPatch1);
int unlinkRes2 = _unlink(pathToPatch2);
while ((unlinkRes1!=0 || unlinkRes2!=0) && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
if (unlinkRes1!=0)
unlinkRes1 = _unlink(pathToPatch1);
if (unlinkRes2!=0)
unlinkRes2 = _unlink(pathToPatch2);
}
if (unlinkRes1!=0) {
char buff2[1024];
strerror_s(buff2, errno);
printf("\nWARNING: unlink %s failed.\nerr=%i (%s)\n", pathToPatch1, errno, buff2);
}
if (unlinkRes2!=0) {
char buff2[1024];
strerror_s(buff2, errno);
printf("\nWARNING: unlink %s failed.\nerr=%i (%s)\n", pathToPatch2, errno, buff2);
}
return PC_WRITE_FILE;
}
}
} transferCallback;
#define USE_TCP
int main(int argc, char **argv)
{
printf("A simple client interface for the advanced autopatcher.\n");
printf("Use DirectoryDeltaTransfer for a simpler version of an autopatcher.\n");
printf("Difficulty: Intermediate\n\n");
printf("Client starting...");
SLNet::SystemAddress serverAddress= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
SLNet::AutopatcherClient autopatcherClient;
SLNet::FileListTransfer fileListTransfer;
autopatcherClient.SetFileListTransferPlugin(&fileListTransfer);
unsigned short localPort=0;
if (argc>=6)
{
const int intLocalPort = atoi(argv[5]);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 2;
}
localPort = static_cast<unsigned short>(intLocalPort);
}
#ifdef USE_TCP
SLNet::PacketizedTCP packetizedTCP;
if (packetizedTCP.Start(localPort,1)==false)
{
printf("Failed to start TCP. Is the port already in use?");
return 1;
}
packetizedTCP.AttachPlugin(&autopatcherClient);
packetizedTCP.AttachPlugin(&fileListTransfer);
#else
SLNet::RakPeerInterface *rakPeer;
rakPeer = SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor socketDescriptor(localPort,0);
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);
#endif
printf("started\n");
char buff[512];
if (argc<2)
{
printf("Enter server IP: ");
Gets(buff,sizeof(buff));
if (buff[0]==0)
//strcpy_s(buff, "natpunch.slikesoft.com");
strcpy_s(buff, "127.0.0.1");
}
else
strcpy_s(buff, argv[1]);
#ifdef USE_TCP
packetizedTCP.Connect(buff,60000,false);
#else
rakPeer->Connect(buff, 60000, 0, 0);
#endif
printf("Connecting...\n");
char appDir[512];
if (argc<3)
{
printf("Enter application directory: ");
Gets(appDir,sizeof(appDir));
if (appDir[0]==0)
{
strcpy_s(appDir, "D:/temp2");
}
}
else
strcpy_s(appDir, argv[2]);
char appName[512];
if (argc<4)
{
printf("Enter application name: ");
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
}
else
strcpy_s(appName, argv[3]);
bool patchImmediately=argc>=5 && argv[4][0]=='1';
if (patchImmediately==false)
{
printf("Optional: Enter path to xdelta exe: ");
Gets(PATH_TO_XDELTA_EXE, sizeof(PATH_TO_XDELTA_EXE));
// https://code.google.com/p/xdelta/downloads/list
if (PATH_TO_XDELTA_EXE[0]==0)
strcpy_s(PATH_TO_XDELTA_EXE, "c:/xdelta3-3.0.6-win32.exe");
if (PATH_TO_XDELTA_EXE[0])
{
printf("Enter working directory to store temporary files: ");
Gets(WORKING_DIRECTORY, sizeof(WORKING_DIRECTORY));
if (WORKING_DIRECTORY[0]==0)
GetTempPathA(MAX_PATH, WORKING_DIRECTORY);
if (WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='\\' || WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='/')
WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=0;
}
printf("Hit 'q' to quit, 'p' to patch, 'f' to full scan. 'c' to cancel the patch. 'r' to reconnect. 'd' to disconnect.\n");
}
else
printf("Hit 'q' to quit, 'c' to cancel the patch.\n");
int ch;
SLNet::Packet *p;
for(;;)
{
#ifdef USE_TCP
SLNet::SystemAddress notificationAddress;
notificationAddress=packetizedTCP.HasCompletedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
serverAddress=notificationAddress;
}
notificationAddress=packetizedTCP.HasNewIncomingConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_NEW_INCOMING_CONNECTION\n");
notificationAddress=packetizedTCP.HasLostConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_LOST\n");
p=packetizedTCP.Receive();
while (p)
{
if (p->data[0]==ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
{
char buff2[256];
SLNet::BitStream temp(p->data, p->length, false);
temp.IgnoreBits(8);
SLNet::StringCompressor::Instance()->DecodeString(buff2, 256, &temp);
printf("ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR\n");
printf("%s\n", buff2);
}
else if (p->data[0]==ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES)
{
printf("ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES\n");
}
else if (p->data[0]==ID_AUTOPATCHER_FINISHED)
{
printf("ID_AUTOPATCHER_FINISHED with server time %f\n", autopatcherClient.GetServerDate());
double srvDate=autopatcherClient.GetServerDate();
FILE *fp;
fopen_s(&fp, "srvDate", "wb");
fwrite(&srvDate,sizeof(double),1,fp);
fclose(fp);
}
else if (p->data[0]==ID_AUTOPATCHER_RESTART_APPLICATION)
printf("Launch \"AutopatcherClientRestarter.exe autopatcherRestart.txt\"\nQuit this application immediately after to unlock files.\n");
packetizedTCP.DeallocatePacket(p);
p=packetizedTCP.Receive();
}
#else
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION\n");
else if (p->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST\n");
else if (p->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
{
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
serverAddress=p->systemAddress;
}
else if (p->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
printf("ID_CONNECTION_ATTEMPT_FAILED\n");
else if (p->data[0]==ID_NO_FREE_INCOMING_CONNECTIONS)
printf("ID_NO_FREE_INCOMING_CONNECTIONS\n");
else if (p->data[0]==ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
{
char buff[256];
SLNet::BitStream temp(p->data, p->length, false);
temp.IgnoreBits(8);
SLNet::StringCompressor::Instance()->DecodeString(buff, 256, &temp);
printf("ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR\n");
printf("%s\n", buff);
}
else if (p->data[0]==ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES)
{
printf("ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES\n");
}
else if (p->data[0]==ID_AUTOPATCHER_FINISHED)
{
printf("ID_AUTOPATCHER_FINISHED with server time %f\n", autopatcherClient.GetServerDate());
double srvDate=autopatcherClient.GetServerDate();
FILE *fp;
fopen_s(&fp, "srvDate", "wb");
fwrite(&srvDate,sizeof(double),1,fp);
fclose(fp);
}
else if (p->data[0]==ID_AUTOPATCHER_RESTART_APPLICATION)
printf("Launch \"AutopatcherClientRestarter.exe autopatcherRestart.txt\"\nQuit this application immediately after to unlock files.\n");
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
#endif
if (_kbhit())
ch=_getch();
else
ch=0;
if (ch=='q')
break;
else if (ch=='r')
{
#ifdef USE_TCP
packetizedTCP.Connect(buff,60000,false);
#else
rakPeer->Connect(buff, 60000, 0, 0);
#endif
}
else if (ch=='d')
{
#ifdef USE_TCP
packetizedTCP.CloseConnection(serverAddress);
#else
rakPeer->CloseConnection(serverAddress, true);
#endif
}
else if (ch=='p' || (serverAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS && patchImmediately==true) || ch=='f')
{
patchImmediately=false;
char restartFile[512];
strcpy_s(restartFile, appDir);
strcat_s(restartFile, "/autopatcherRestart.txt");
double lastUpdateDate;
if (ch=='f')
{
lastUpdateDate=0;
}
else
{
FILE *fp;
if (fopen_s(&fp, "srvDate", "rb") == 0)
{
fread(&lastUpdateDate, sizeof(lastUpdateDate), 1, fp);
fclose(fp);
}
else
lastUpdateDate=0;
}
if (autopatcherClient.PatchApplication(appName, appDir, lastUpdateDate, serverAddress, &transferCallback, restartFile, argv[0]))
{
printf("Patching process starting.\n");
}
else
{
printf("Failed to start patching.\n");
}
}
else if (ch=='c')
{
autopatcherClient.Clear();
printf("Autopatcher cleared.\n");
}
RakSleep(30);
}
// Dereference so the destructor doesn't crash
autopatcherClient.SetFileListTransferPlugin(0);
#ifdef USE_TCP
packetizedTCP.Stop();
#else
rakPeer->Shutdown(500,0);
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
#endif
return 1;
}

View File

@ -0,0 +1,34 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project(AutopatcherClient)
set(Autopatcher_SOURCE_DIR ${SLikeNet_SOURCE_DIR}/DependentExtensions/Autopatcher)
set(BZip2_SOURCE_DIR ${SLikeNet_SOURCE_DIR}/DependentExtensions/bzip2-1.0.6)
include_directories(${SLIKENET_HEADER_FILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} )
FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/*.cpp" "${Autopatcher_SOURCE_DIR}/*.h")
LIST(REMOVE_ITEM AUTOSRC "${Autopatcher_SOURCE_DIR}/AutopatcherServer.cpp" "${Autopatcher_SOURCE_DIR}/AutopatcherServer.h" )
FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h")
LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c")
SOURCE_GROUP(BZip2 FILES ${BZSRC})
SET(WRAPFILES "${Autopatcher_SOURCE_DIR}/MemoryCompressor.cpp" "${Autopatcher_SOURCE_DIR}/MemoryCompressor.h")
LIST(REMOVE_ITEM AUTOSRC ${WRAPFILES})
SOURCE_GROUP(Client_Files FILES ${AUTOSRC})
SOURCE_GROUP(MAIN FILES "AutopatcherClientTest.cpp")
SOURCE_GROUP(BZip2Wrapper FILES ${WRAPFILES})
add_executable(AutopatcherClient "AutopatcherClientTest.cpp" ${AUTOSRC} ${BZSRC} ${WRAPFILES})
target_link_libraries(AutopatcherClient ${SLIKENET_COMMON_LIBS})
##VSUBFOLDER(AutopatcherClient "Samples/AutoPatcher/Client")

View File

@ -0,0 +1,23 @@
del /Q srvDate
rmdir /S /Q d:\temp2
rmdir /S /Q d:\temp3
rmdir /S /Q d:\temp4
rmdir /S /Q d:\temp5
rmdir /S /Q d:\temp6
rmdir /S /Q d:\temp7
rmdir /S /Q d:\temp8
rmdir /S /Q d:\temp9
rmdir /S /Q d:\temp10
rmdir /S /Q d:\temp11
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp2 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp3 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp4 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp5 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp6 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp7 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp8 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp9 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp10 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp11 TestApp 1

View File

@ -0,0 +1,303 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherClientGFx3</ProjectName>
<ProjectGuid>{5BCE2D70-53B4-42F9-ABFE-1BC26E59C4FD}</ProjectGuid>
<RootNamespace>AutopatcherClientGFx3</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Debug\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Debug;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClientGFx3.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Debug\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Debug;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClientGFx3.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp" />
<ClCompile Include="AutopatcherClientGFx3Impl.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzip2.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
<ClCompile Include="..\..\DependentExtensions\GFx3\FxGameDelegate.cpp" />
<ClCompile Include="GFxPlayerTinyD3D9.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h" />
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h" />
<ClInclude Include="AutopatcherClientGFx3Impl.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
<ClInclude Include="..\..\DependentExtensions\GFx3\FxGameDelegate.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Client Files">
<UniqueIdentifier>{b6f49cc2-408d-47b8-8ad5-eaf3c6996cc6}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{21f8af2d-ce01-47e1-903f-b5cc3b32030a}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2">
<UniqueIdentifier>{17c1e00f-1867-4c62-931e-529d23297b27}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2Wrapper">
<UniqueIdentifier>{49a51911-908b-44d3-a402-3350728ec567}</UniqueIdentifier>
</Filter>
<Filter Include="GFx3">
<UniqueIdentifier>{12d55ff1-6f87-490d-9543-26f70a1b9755}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="AutopatcherClientGFx3Impl.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzip2.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>BZip2Wrapper</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\GFx3\FxGameDelegate.cpp">
<Filter>GFx3</Filter>
</ClCompile>
<ClCompile Include="GFxPlayerTinyD3D9.cpp">
<Filter>GFx3</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="AutopatcherClientGFx3Impl.h">
<Filter>Main</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>BZip2Wrapper</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\GFx3\FxGameDelegate.h">
<Filter>GFx3</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,342 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// Common includes
#include <stdio.h>
#include <stdlib.h>
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/StringCompressor.h"
#include "slikenet/PacketizedTCP.h"
// Client only includes
#include "slikenet/FileListTransferCBInterface.h"
#include "slikenet/FileListTransfer.h"
#include "AutopatcherClient.h"
#include "slikenet/AutopatcherPatchContext.h"
#include "slikenet/sleep.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#include "AutopatcherClientGFx3Impl.h"
using namespace SLNet;
static const char *AUTOPATCHER_LAST_UPDATE_FILE="autopatcherLastUpdate.txt";
static const char *AUTOPATCHER_RESTART_FILE="autopatcherRestart.txt";
class TestCB : public SLNet::FileListTransferCBInterface
{
public:
virtual bool OnFile(OnFileStruct *onFileStruct)
{
char buff[1024];
if (onFileStruct->context.op==PC_HASH_1_WITH_PATCH || onFileStruct->context.op==PC_HASH_2_WITH_PATCH)
strcpy_s(buff,"Patched: ");
else if (onFileStruct->context.op==PC_WRITE_FILE)
strcpy_s(buff,"Written: ");
else if (onFileStruct->context.op==PC_ERROR_FILE_WRITE_FAILURE)
strcpy_s(buff,"Write Failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_TARGET_MISSING)
strcpy_s(buff,"Patch target missing: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_APPLICATION_FAILURE)
strcpy_s(buff,"Patch process failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_RESULT_CHECKSUM_FAILURE)
strcpy_s(buff,"Patch checksum failure: ");
else if (onFileStruct->context.op==PC_NOTICE_WILL_COPY_ON_RESTART)
strcpy_s(buff,"Copy pending restart: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED)
strcpy_s(buff,"Downloaded: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED_PATCH)
strcpy_s(buff,"Downloaded Patch: ");
else
RakAssert(0);
sprintf(buff+strlen(buff), "%i. (100%%) %i/%i %s %ib / %ib\n", onFileStruct->setID, onFileStruct->fileIndex+1, onFileStruct->numberOfFilesInThisSet,
onFileStruct->fileName, onFileStruct->byteLengthOfThisFile,
onFileStruct->byteLengthOfThisSet);
FxResponseArgs<1> args;
args.Add(GFxValue(buff));
FxDelegate::Invoke2(autopatcherClient->movie, "addToPatchNotesText", args);
FxResponseArgs<5> args2;
args2.Add(GFxValue(buff));
args2.Add(GFxValue(1.0));
args2.Add(GFxValue(1.0));
args2.Add(GFxValue((double)onFileStruct->bytesDownloadedForThisSet));
args2.Add(GFxValue((double)onFileStruct->byteLengthOfThisSet));
FxDelegate::Invoke2(autopatcherClient->movie, "updateProgressBars", args2);
// Return false for the file data to be deallocated automatically
return false;
}
virtual void OnFileProgress(FileProgressStruct *fps)
{
char buff[1024];
sprintf(buff, "%s %ib / %ib\n", fps->onFileStruct->fileName,
fps->onFileStruct->bytesDownloadedForThisFile, fps->onFileStruct->byteLengthOfThisFile);
FxResponseArgs<5> args2;
float thisFileProgress,totalProgress;
thisFileProgress=(float)fps->partCount/(float)fps->partTotal;
totalProgress=(float)(fps->onFileStruct->fileIndex+1)/(float)fps->onFileStruct->numberOfFilesInThisSet;
args2.Add(GFxValue(buff));
args2.Add(GFxValue((double)fps->onFileStruct->bytesDownloadedForThisFile));
args2.Add(GFxValue((double)fps->onFileStruct->byteLengthOfThisFile));
args2.Add(GFxValue((double)fps->onFileStruct->bytesDownloadedForThisSet));
args2.Add(GFxValue((double)fps->onFileStruct->byteLengthOfThisSet));
FxDelegate::Invoke2(autopatcherClient->movie, "updateProgressBars", args2);
}
AutopatcherClientGFx3Impl *autopatcherClient;
} transferCallback;
AutopatcherClientGFx3Impl::AutopatcherClientGFx3Impl()
{
autopatcherClient=0;
fileListTransfer=0;
packetizedTCP=0;
}
AutopatcherClientGFx3Impl::~AutopatcherClientGFx3Impl()
{
Shutdown();
}
void AutopatcherClientGFx3Impl::Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie)
{
pDelegate->RegisterHandler(this);
delegate=pDelegate;
movie=pMovie;
strcpy_s(pathToThisExe,_pathToThisExe);
autopatcherClient= SLNet::OP_NEW<AutopatcherClient>(_FILE_AND_LINE_);
fileListTransfer= SLNet::OP_NEW<FileListTransfer>(_FILE_AND_LINE_);
packetizedTCP= SLNet::OP_NEW<PacketizedTCP>(_FILE_AND_LINE_);
autopatcherClient->SetFileListTransferPlugin(fileListTransfer);
packetizedTCP->AttachPlugin(autopatcherClient);
packetizedTCP->AttachPlugin(fileListTransfer);
}
void AutopatcherClientGFx3Impl::Update(void)
{
SLNet::Packet *p;
SystemAddress notificationAddress;
notificationAddress=packetizedTCP->HasCompletedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
UpdateConnectResult(true);
serverAddress=notificationAddress;
}
notificationAddress=packetizedTCP->HasFailedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
UpdateConnectResult(false);
}
notificationAddress=packetizedTCP->HasNewIncomingConnection();
notificationAddress=packetizedTCP->HasLostConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
UpdateConnectResult(false);
}
p=packetizedTCP->Receive();
while (p)
{
if (p->data[0]==ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
{
char buff[256];
SLNet::BitStream temp(p->data, p->length, false);
temp.IgnoreBits(8);
StringCompressor::Instance()->DecodeString(buff, 256, &temp);
// Error.
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
FxResponseArgs<1> args2;
args2.Add(GFxValue(buff));
FxDelegate::Invoke2(movie, "setCompletionMessage", args2);
}
else if (p->data[0]==ID_AUTOPATCHER_FINISHED)
{
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
SaveLastUpdateDate();
}
else if (p->data[0]==ID_AUTOPATCHER_RESTART_APPLICATION)
{
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
FxResponseArgs<1> args2;
SLNet::RakString completionMsg("Launch \"AutopatcherClientRestarter.exe %s\"\nQuit this application immediately after to unlock files.\n", AUTOPATCHER_RESTART_FILE);
args2.Add(GFxValue(completionMsg.C_String()));
FxDelegate::Invoke2(movie, "setCompletionMessage", args2);
SaveLastUpdateDate();
}
packetizedTCP->DeallocatePacket(p);
p=packetizedTCP->Receive();
}
}
void AutopatcherClientGFx3Impl::Shutdown(void)
{
if (delegate.GetPtr()!=0)
{
delegate->UnregisterHandler(this);
delegate.Clear();
}
movie.Clear();
if (packetizedTCP)
packetizedTCP->Stop();
SLNet::OP_DELETE(autopatcherClient,_FILE_AND_LINE_);
SLNet::OP_DELETE(fileListTransfer,_FILE_AND_LINE_);
SLNet::OP_DELETE(packetizedTCP,_FILE_AND_LINE_);
autopatcherClient=0;
fileListTransfer=0;
packetizedTCP=0;
}
const char* AutopatcherClientGFx3Impl::Connect(const char *ip, unsigned short port)
{
if (packetizedTCP->Start(0,1)==true)
{
packetizedTCP->Connect(ip,port,false);
return "Connecting";
}
else
return "Start call failed.";
}
void AutopatcherClientGFx3Impl::PressedPatch(const FxDelegateArgs& pparams)
{
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
//appNameText.text, appDirectoryText.text, fullRescanBtn.selected
const char *appName = pparams[0].GetString();
const char *appDir = pparams[1].GetString();
bool fullRescan = pparams[2].GetBool();
strcpy_s(prt->appDirectory, appDir);
char restartFile[512];
strcpy_s(restartFile, appDir);
strcat(restartFile, "/");
strcat(restartFile, AUTOPATCHER_RESTART_FILE);
double lastUpdateDate;
if (fullRescan==false)
prt->LoadLastUpdateDate(&lastUpdateDate,appDir);
else
lastUpdateDate=0;
transferCallback.autopatcherClient=prt;
if (prt->autopatcherClient->PatchApplication(appName, appDir, lastUpdateDate, prt->serverAddress, &transferCallback, restartFile, prt->pathToThisExe))
{
FxDelegate::Invoke2(prt->movie, "gotoPatchMenu", FxResponseArgs<0>());
}
else
{
prt->packetizedTCP->Stop();
//prt->UpdateConnectResult("Failed to start patching");
FxDelegate::Invoke2(prt->movie, "gotoPatchStartMenu", FxResponseArgs<0>());
}
}
void AutopatcherClientGFx3Impl::OpenSite(const FxDelegateArgs& pparams)
{
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
const char *siteType = pparams[0].GetString();
if (_stricmp(siteType, "help")==0)
{
ShellExecute(nullptr, "open", "http://www.jenkinssoftware.com/raknet/manual/autopatcher.html", nullptr, nullptr, SW_SHOWNORMAL);
}
else if (_stricmp(siteType, "raknet")==0)
{
ShellExecute(nullptr, "open", "http://www.jenkinssoftware.com/", nullptr, nullptr, SW_SHOWNORMAL);
}
else if (_stricmp(siteType, "scaleform")==0)
{
ShellExecute(nullptr, "open", "https://www.scaleform.com/", nullptr, nullptr, SW_SHOWNORMAL);
}
}
void AutopatcherClientGFx3Impl::PressedConnect(const FxDelegateArgs& pparams)
{
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
const char *result = prt->Connect(pparams[0].GetString(), atoi(pparams[1].GetString()));
}
void AutopatcherClientGFx3Impl::PressedOKBtn(const FxDelegateArgs& pparams)
{
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
prt->autopatcherClient->Clear();
prt->packetizedTCP->Stop();
prt->GotoMainMenu();
}
void AutopatcherClientGFx3Impl::UpdateConnectResult( bool isConnected )
{
FxResponseArgs<1> args;
args.Add(GFxValue(isConnected));
FxDelegate::Invoke2(movie, "ConnectResult", args);
}
void AutopatcherClientGFx3Impl::Accept(CallbackProcessor* cbreg)
{
cbreg->Process( "PressedOKBtn", &AutopatcherClientGFx3Impl::PressedOKBtn );
cbreg->Process( "PressedConnect", &AutopatcherClientGFx3Impl::PressedConnect );
cbreg->Process( "PressedPatch", &AutopatcherClientGFx3Impl::PressedPatch );
cbreg->Process( "openSite", &AutopatcherClientGFx3Impl::OpenSite );
}
void AutopatcherClientGFx3Impl::SaveLastUpdateDate(void)
{
char inPath[512];
double serverDate=autopatcherClient->GetServerDate();
strcpy_s(inPath, appDirectory);
strcat(inPath, "/");
strcat(inPath, AUTOPATCHER_LAST_UPDATE_FILE);
FILE *fp;
if (fopen_s(&fp,inPath,"wb")==0)
{
fwrite(&serverDate,sizeof(double),1,fp);
fclose(fp);
}
}
void AutopatcherClientGFx3Impl::LoadLastUpdateDate(double *out, const char *appDir)
{
char inPath[512];
strcpy_s(appDirectory,appDir);
strcpy_s(inPath, appDirectory);
strcat(inPath, "/");
strcat(inPath, AUTOPATCHER_LAST_UPDATE_FILE);
FILE *fp;
if (fopen_s(&fp,inPath,"rb")==0)
{
fread(out,sizeof(double),1,fp);
fclose(fp);
}
else
out[0]=0;
}
void AutopatcherClientGFx3Impl::GotoMainMenu(void)
{
FxDelegate::Invoke2(movie, "gotoMainMenu", FxResponseArgs<0>());
autopatcherClient->Clear();
packetizedTCP->Stop();
}

View File

@ -0,0 +1,62 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, 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.
*/
#include "slikenet/types.h"
#include "FxGameDelegate.h"
namespace SLNet {
class AutopatcherClient;
class FileListTransfer;
class PacketizedTCP;
// GFxPlayerTinyD3D9.cpp has an instance of this class, and callls the corresponding 3 function
// This keeps the patching code out of the GFx sample as much as possible
class AutopatcherClientGFx3Impl : public FxDelegateHandler
{
public:
AutopatcherClientGFx3Impl();
~AutopatcherClientGFx3Impl();
void Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie);
void Update(void);
void Shutdown(void);
// Callback from flash
static void PressedConnect(const FxDelegateArgs& pparams);
static void PressedOKBtn(const FxDelegateArgs& pparams);
static void PressedPatch(const FxDelegateArgs& pparams);
static void OpenSite(const FxDelegateArgs& pparams);
// Update all callbacks from flash
void Accept(CallbackProcessor* cbreg);
const char* Connect(const char *ip, unsigned short port);
void UpdateConnectResult(bool isConnected);
void SaveLastUpdateDate(void);
void LoadLastUpdateDate(double *out, const char *appDir);
void GotoMainMenu(void);
AutopatcherClient *autopatcherClient;
FileListTransfer *fileListTransfer;
PacketizedTCP *packetizedTCP;
SystemAddress serverAddress;
char pathToThisExe[512];
char appDirectory[512];
GPtr<FxDelegate> delegate;
GPtr<GFxMovieView> movie;
};
} // namespace SLNet

View File

@ -0,0 +1,38 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project(AutopatcherClientGFx3)
IF(WIN32 AND NOT UNIX)
FINDD3D()
FINDSCALEGFX()
include_directories(${SLIKENET_HEADER_FILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ${D3D_INCLUDE_DIR} ${SCALEGFX_INCLUDE_DIR} "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3")
FILE(GLOB GFXSRC GFxPlayerTinyD3D9.cpp "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.cpp" "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.h")
FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/*.cpp" "${Autopatcher_SOURCE_DIR}/*.h")
FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h")
LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c")
SOURCE_GROUP(BZip2 FILES ${BZSRC})
SET(WRAPFILES "${Autopatcher_SOURCE_DIR}/MemoryCompressor.cpp" "${Autopatcher_SOURCE_DIR}/MemoryCompressor.h")
LIST(REMOVE_ITEM AUTOSRC ${WRAPFILES})
SOURCE_GROUP(Client_Files FILES ${AUTOSRC})
SOURCE_GROUP(Main FILES "AutopatcherClientGFx3Impl.cpp" AutopatcherClientGFx3Impl.h)
SOURCE_GROUP(BZip2Wrapper FILES ${WRAPFILES})
SOURCE_GROUP(GFx3 FILES ${GFXSRC})
add_executable(AutopatcherClientGFx3 WIN32 "AutopatcherClientGFx3Impl.cpp" AutopatcherClientGFx3Impl.h ${AUTOSRC} ${BZSRC} ${WRAPFILES} ${GFXSRC})
target_link_libraries(AutopatcherClientGFx3 ${SLIKENET_COMMON_LIBS} ${D3D_LIBRARIES} winmm.lib imm32.lib ${SCALEGFX_DEBUG_LIBRARIES} ${SCALEGFX_LIBRARIES})
VSUBFOLDER(AutopatcherClientGFx3 "Samples/AutoPatcher/Client")
ENDIF(WIN32 AND NOT UNIX)

View File

@ -0,0 +1,250 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherClientRestarter</ProjectName>
<ProjectGuid>{D1BEED3B-4E09-4D77-9C15-55F596617F43}</ProjectGuid>
<RootNamespace>AutopatcherClientRestarter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClientRestarter.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClientRestarter.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,22 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project(AutopatcherClientRestarter)
include_directories(${SLIKENET_HEADER_FILES} ./)
add_executable(AutopatcherClientRestarter "main.cpp")
target_link_libraries(AutopatcherClientRestarter ${SLIKENET_COMMON_LIBS})
VSUBFOLDER(AutopatcherClientRestarter "Samples/AutoPatcher/Client")

View File

@ -0,0 +1,127 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
#include <stdio.h>
#if defined(_WIN32)
#include "slikenet/WindowsIncludes.h" // Sleep and CreateProcess
#include <process.h> // system
#else
#include <unistd.h> // usleep
#include <cstdio>
#include <signal.h> //kill
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#include <iostream>
using namespace std;
// This is a simple tool to take the output of PatchApplication::restartOutputFilename
// Perform file operations while that application is not running, and then relaunch that application
int main(int argc, char **argv)
{
// Run commands on argv[1] and launch argv[2];
// Run commands on argv[1] and launch argv[2];
if (argc!=2)
{
printf("Usage: FileContainingCommands\n");
return 1;
}
bool deleteFile=false;
FILE *fp;
if (fopen_s(&fp, argv[1], "rt") != 0)
{
printf("Error: Cannot open %s\n", argv[1]);
return 1;
}
char buff[256];
if (fgets(buff,255,fp)==0)
return 1;
buff[strlen(buff)]=0;
while (buff[0])
{
if (strncmp(buff, "#Sleep ", 7)==0)
{
int sleepTime=atoi(buff+7);
#ifdef _WIN32
Sleep(sleepTime);
#else
usleep(sleepTime * 1000);
#endif
}
else if (strncmp(buff, "#DeleteThisFile", 15)==0)
deleteFile=true;
else if (strncmp(buff, "#CreateProcess ", 15)==0)
{
#ifdef _WIN32
PROCESS_INFORMATION pi;
STARTUPINFOA si;
// Set up the start up info struct.
memset(&si, 0, sizeof(STARTUPINFOA));
si.cb = sizeof(STARTUPINFOA);
// Launch the child process.
if (!CreateProcessA(
nullptr,
buff+15,
nullptr, nullptr,
TRUE,
CREATE_NEW_CONSOLE,
nullptr, nullptr,
&si,
&pi))
return 1;
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
#else
char PathName[255];
strcpy_s(PathName, buff+15);
system(PathName); //This actually runs the application.
#endif
}
else
{
system(buff);
}
if (fgets(buff,255,fp)==0)
break;
buff[strlen(buff)]=0;
}
fclose(fp);
// Done!
if (deleteFile)
{
#ifdef _WIN32
_unlink(argv[1]);
#else
unlink(argv[1]);
#endif
}
}

View File

@ -0,0 +1,498 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// serverIP should be ip address of patcher
// pathToGame should be something like "C:\Games\mygame", whatever the installation path was
// gameName should be patcherHostSubdomainURL found in AutopatcherServer_SelfScaling
// patchImmediately should be 1
// portToStartOn should be 0
// serverPort should be 60000, see LISTEN_PORT_TCP_PATCHER in AutopatcherServer_SelfScaling
// fullScan should be '1' to fully scan all files. 0 to use the last patch.
// Common includes
#include <stdio.h>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/StringCompressor.h"
#include "slikenet/PacketizedTCP.h"
#include "slikenet/socket2.h"
// Client only includes
#include "slikenet/FileListTransferCBInterface.h"
#include "slikenet/FileListTransfer.h"
#include "AutopatcherClient.h"
#include "slikenet/AutopatcherPatchContext.h"
#include "slikenet/Gets.h"
#include "slikenet/sleep.h"
#include "slikenet/CloudClient.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
void GetServers(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
void GetClientSubscription(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
void UploadInstanceToCloud(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
#define CLOUD_CLIENT_PRIMARY_KEY "SelfScaling_Patcher_PK"
class TestCB : public SLNet::AutopatcherClientCBInterface
{
public:
virtual bool OnFile(OnFileStruct *onFileStruct)
{
if (onFileStruct->context.op==PC_HASH_1_WITH_PATCH || onFileStruct->context.op==PC_HASH_2_WITH_PATCH)
printf("Patched: ");
else if (onFileStruct->context.op==PC_WRITE_FILE)
printf("Written: ");
else if (onFileStruct->context.op==PC_ERROR_FILE_WRITE_FAILURE)
printf("Write Failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_TARGET_MISSING)
printf("Patch target missing: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_APPLICATION_FAILURE)
printf("Patch process failure: ");
else if (onFileStruct->context.op==PC_ERROR_PATCH_RESULT_CHECKSUM_FAILURE)
printf("Patch checksum failure: ");
else if (onFileStruct->context.op==PC_NOTICE_WILL_COPY_ON_RESTART)
printf("Copy pending restart: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED)
printf("Downloaded: ");
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED_PATCH)
printf("Downloaded Patch: ");
else
RakAssert(0);
printf("%i. (100%%) %i/%i %s %ib / %ib\n", onFileStruct->setID, onFileStruct->fileIndex+1, onFileStruct->numberOfFilesInThisSet,
onFileStruct->fileName, onFileStruct->byteLengthOfThisFile,
onFileStruct->byteLengthOfThisSet);
// Return false for the file data to be deallocated automatically
return false;
}
virtual void OnFileProgress(FileProgressStruct *fps)
{
printf("Downloading: %i. (%i%%) %i/%i %s %ib/%ib %ib/%ib total\n", fps->onFileStruct->setID,
(int) (100.0*(double)fps->onFileStruct->bytesDownloadedForThisFile/(double)fps->onFileStruct->byteLengthOfThisFile),
fps->onFileStruct->fileIndex+1, fps->onFileStruct->numberOfFilesInThisSet, fps->onFileStruct->fileName,
fps->onFileStruct->bytesDownloadedForThisFile,
fps->onFileStruct->byteLengthOfThisFile,
fps->onFileStruct->bytesDownloadedForThisSet,
fps->onFileStruct->byteLengthOfThisSet
);
}
virtual PatchContext ApplyPatchBase(const char *oldFilePath, char **newFileContents, unsigned int *newFileSize, char *patchContents, unsigned int patchSize, uint32_t patchAlgorithm)
{
if (patchAlgorithm==0)
{
return ApplyPatchBSDiff(oldFilePath, newFileContents, newFileSize, patchContents, patchSize);
}
else
{
char WORKING_DIRECTORY[MAX_PATH];
GetTempPathA(MAX_PATH, WORKING_DIRECTORY);
if (WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='\\' || WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='/')
WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=0;
char buff[128];
SLNet::TimeUS time = SLNet::GetTimeUS();
#if defined(_WIN32)
sprintf_s(buff, "%I64u", time);
#else
sprintf_s(buff, "%llu", (long long unsigned int) time);
#endif
char pathToPatch1[MAX_PATH], pathToPatch2[MAX_PATH];
sprintf_s(pathToPatch1, "%s/patchClient_%s.tmp", WORKING_DIRECTORY, buff);
FILE *fpPatch;
if (fopen_s(&fpPatch, pathToPatch1, "wb")!=0)
return PC_ERROR_PATCH_TARGET_MISSING;
fwrite(patchContents, 1, patchSize, fpPatch);
fclose(fpPatch);
// Invoke xdelta
// See https://code.google.com/p/xdelta/wiki/CommandLineSyntax
char commandLine[512];
_snprintf(commandLine, sizeof(commandLine)-1, "-d -f -s %s %s/patchClient_%s.tmp %s/newFile_%s.tmp", oldFilePath, WORKING_DIRECTORY, buff, WORKING_DIRECTORY, buff);
commandLine[511]=0;
SHELLEXECUTEINFOA shellExecuteInfo;
shellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shellExecuteInfo.fMask = SEE_MASK_NOASYNC | SEE_MASK_NO_CONSOLE;
shellExecuteInfo.hwnd = nullptr;
shellExecuteInfo.lpVerb = "open";
shellExecuteInfo.lpFile = "xdelta3-3.0.6-win32.exe";
shellExecuteInfo.lpParameters = commandLine;
shellExecuteInfo.lpDirectory = nullptr;
shellExecuteInfo.nShow = SW_SHOWNORMAL;
shellExecuteInfo.hInstApp = nullptr;
ShellExecuteExA(&shellExecuteInfo);
// // ShellExecute is blocking, but if it writes a file to disk that file is not always immediately accessible after it returns. And this only happens in release, and only when not running in the debugger
// ShellExecute(nullptr, "open", "xdelta3-3.0.6-win32.exe", commandLine, nullptr, SW_SHOWNORMAL);
sprintf_s(pathToPatch2, "%s/newFile_%s.tmp", WORKING_DIRECTORY, buff);
errno_t error = fopen_s(&fpPatch, pathToPatch2, "r+b");
SLNet::TimeUS stopWaiting = time + 60000000;
while (error!=0 && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
error = fopen_s(&fpPatch, pathToPatch2, "r+b");
}
if (error!=0)
{
char buff2[1024];
strerror_s(buff2, errno);
printf("\nERROR: Could not open %s.\nerr=%i (%s)\narguments=%s\n", pathToPatch2, errno, buff2, commandLine);
return PC_ERROR_PATCH_TARGET_MISSING;
}
fseek(fpPatch, 0, SEEK_END);
*newFileSize = ftell(fpPatch);
fseek(fpPatch, 0, SEEK_SET);
*newFileContents = (char*) rakMalloc_Ex(*newFileSize, _FILE_AND_LINE_);
fread(*newFileContents, 1, *newFileSize, fpPatch);
fclose(fpPatch);
int unlinkRes1 = _unlink(pathToPatch1);
int unlinkRes2 = _unlink(pathToPatch2);
while ((unlinkRes1!=0 || unlinkRes2!=0) && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
if (unlinkRes1!=0)
unlinkRes1 = _unlink(pathToPatch1);
if (unlinkRes2!=0)
unlinkRes2 = _unlink(pathToPatch2);
}
if (unlinkRes1!=0) {
char buff2[1024];
strerror_s(buff2, errno);
printf("\nWARNING: unlink %s failed.\nerr=%i (%s)\n", pathToPatch1, errno, buff2);
}
if (unlinkRes2!=0) {
char buff2[1024];
strerror_s(buff2, errno);
printf("\nWARNING: unlink %s failed.\nerr=%i (%s)\n", pathToPatch2, errno, buff2);
}
return PC_WRITE_FILE;
}
}
} transferCallback;
int main(int argc, char **argv)
{
if (argc<8)
{
printf("Arguments: serverIP, pathToGame, gameName, patchImmediately, localPort, serverPort, fullScan");
return 0;
}
SLNet::SystemAddress TCPServerAddress= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
SLNet::AutopatcherClient autopatcherClient;
SLNet::FileListTransfer fileListTransfer;
SLNet::CloudClient cloudClient;
autopatcherClient.SetFileListTransferPlugin(&fileListTransfer);
bool didRebalance=false; // So we only reconnect to a lower load server once, for load balancing
bool fullScan = argv[7][0]=='1';
const int intLocalPort = atoi(argv[5]);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 2;
}
unsigned short localPort = static_cast<unsigned short>(intLocalPort);
const int intServerPort = atoi(argv[6]);
if ((intServerPort < 0) || (intServerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified server port %d is outside valid bounds [0, %u]", intServerPort, std::numeric_limits<unsigned short>::max());
return 3;
}
unsigned short serverPort = static_cast<unsigned short>(intServerPort);
SLNet::PacketizedTCP packetizedTCP;
if (packetizedTCP.Start(localPort,1)==false)
{
printf("Failed to start TCP. Is the port already in use?");
return 1;
}
packetizedTCP.AttachPlugin(&autopatcherClient);
packetizedTCP.AttachPlugin(&fileListTransfer);
SLNet::RakPeerInterface *rakPeer;
rakPeer = SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor socketDescriptor(localPort,0);
rakPeer->Startup(1,&socketDescriptor, 1);
rakPeer->AttachPlugin(&cloudClient);
DataStructures::List<SLNet::RakNetSocket2* > sockets;
rakPeer->GetSockets(sockets);
printf("Started on port %i\n", sockets[0]->GetBoundAddress().GetPort());
char buff[512];
strcpy_s(buff, argv[1]);
rakPeer->Connect(buff, serverPort, 0, 0);
printf("Connecting...\n");
char appDir[512];
strcpy_s(appDir, argv[2]);
char appName[512];
strcpy_s(appName, argv[3]);
bool patchImmediately=argc>=5 && argv[4][0]=='1';
SLNet::Packet *p;
bool running = true;
while(running)
{
SLNet::SystemAddress notificationAddress;
notificationAddress=packetizedTCP.HasCompletedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
TCPServerAddress=notificationAddress;
}
notificationAddress=packetizedTCP.HasNewIncomingConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_NEW_INCOMING_CONNECTION\n");
notificationAddress=packetizedTCP.HasLostConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_LOST\n");
notificationAddress=packetizedTCP.HasFailedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("ID_CONNECTION_ATTEMPT_FAILED TCP\n");
break;
}
p=packetizedTCP.Receive();
while (p)
{
if (p->data[0]==ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
{
char buff2[256];
SLNet::BitStream temp(p->data, p->length, false);
temp.IgnoreBits(8);
SLNet::StringCompressor::Instance()->DecodeString(buff2, 256, &temp);
printf("ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR\n");
printf("%s\n", buff2);
running = false;
break;
}
else if (p->data[0]==ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES)
{
printf("ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES\n");
running = false;
break;
}
else if (p->data[0]==ID_AUTOPATCHER_FINISHED)
{
printf("ID_AUTOPATCHER_FINISHED with server time %f\n", autopatcherClient.GetServerDate());
double srvDate=autopatcherClient.GetServerDate();
FILE *fp;
fopen_s(&fp, "srvDate", "wb");
fwrite(&srvDate,sizeof(double),1,fp);
fclose(fp);
running = false;
break;
}
else if (p->data[0]==ID_AUTOPATCHER_RESTART_APPLICATION)
{
printf("ID_AUTOPATCHER_RESTART_APPLICATION");
running = false;
break;
}
// Launch \"AutopatcherClientRestarter.exe autopatcherRestart.txt\"\nQuit this application immediately after to unlock files.\n");
packetizedTCP.DeallocatePacket(p);
p=packetizedTCP.Receive();
}
if (!running)
break;
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
{
// UploadInstanceToCloud(&cloudClient, p->guid);
// GetClientSubscription(&cloudClient, p->guid);
GetServers(&cloudClient, p->guid);
break;
}
else if (p->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
{
printf("ID_CONNECTION_ATTEMPT_FAILED UDP\n");
running = false;
break;
}
else if (p->data[0]==ID_CLOUD_GET_RESPONSE)
{
SLNet::CloudQueryResult cloudQueryResult;
cloudClient.OnGetReponse(&cloudQueryResult, p);
unsigned int rowIndex;
const bool wasCallToGetServers=cloudQueryResult.cloudQuery.keys[0].primaryKey=="CloudConnCount";
printf("\n");
if (wasCallToGetServers)
printf("Downloaded server list. %i servers.\n", cloudQueryResult.rowsReturned.Size());
unsigned short connectionsOnOurServer=65535;
unsigned short lowestConnectionsServer=65535;
SLNet::SystemAddress lowestConnectionAddress;
for (rowIndex=0; rowIndex < cloudQueryResult.rowsReturned.Size(); rowIndex++)
{
SLNet::CloudQueryRow *row = cloudQueryResult.rowsReturned[rowIndex];
if (wasCallToGetServers)
{
unsigned short connCount;
SLNet::BitStream bsIn(row->data, row->length, false);
bsIn.Read(connCount);
printf("%i. Server found at %s with %i connections\n", rowIndex+1, row->serverSystemAddress.ToString(true), connCount);
unsigned short connectionsExcludingOurselves;
if (row->serverGUID==p->guid)
connectionsExcludingOurselves=connCount-1;
else
connectionsExcludingOurselves=connCount;
// Find the lowest load server (optional)
if (p->guid==row->serverGUID)
{
connectionsOnOurServer=connectionsExcludingOurselves;
}
else if (connectionsExcludingOurselves < lowestConnectionsServer)
{
lowestConnectionsServer=connectionsExcludingOurselves;
lowestConnectionAddress=row->serverSystemAddress;
}
}
}
// Do load balancing by reconnecting to lowest load server (optional)
if (didRebalance==false && wasCallToGetServers)
{
if (cloudQueryResult.rowsReturned.Size()>0 && connectionsOnOurServer>lowestConnectionsServer)
{
printf("Reconnecting to lower load server %s\n", lowestConnectionAddress.ToString(false));
rakPeer->CloseConnection(p->guid, true);
// Wait for the thread to close, otherwise will immediately get back ID_CONNECTION_ATTEMPT_FAILED because no free outgoing connection slots
// Alternatively, just call Startup() with 2 slots instead of 1
RakSleep(500);
rakPeer->Connect(lowestConnectionAddress.ToString(false), lowestConnectionAddress.GetPort(), 0, 0);
// TCP Connect to new IP address
packetizedTCP.Connect(lowestConnectionAddress.ToString(false),serverPort,false);
}
else
{
// TCP Connect to original IP address
packetizedTCP.Connect(buff,serverPort,false);
}
didRebalance=true;
}
cloudClient.DeallocateWithDefaultAllocator(&cloudQueryResult);
}
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
if (!running)
break;
if (TCPServerAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS && patchImmediately==true)
{
patchImmediately=false;
char restartFile[512];
strcpy_s(restartFile, appDir);
strcat_s(restartFile, "/autopatcherRestart.txt");
double lastUpdateDate;
if (fullScan==false)
{
FILE *fp;
if (fopen_s(&fp, "srvDate", "rb") == 0)
{
fread(&lastUpdateDate, sizeof(lastUpdateDate), 1, fp);
fclose(fp);
}
else
lastUpdateDate=0;
}
else
lastUpdateDate=0;
if (autopatcherClient.PatchApplication(appName, appDir, lastUpdateDate, TCPServerAddress, &transferCallback, restartFile, argv[0]))
{
printf("Patching process starting.\n");
}
else
{
printf("Failed to start patching.\n");
break;
}
}
RakSleep(30);
}
// Dereference so the destructor doesn't crash
autopatcherClient.SetFileListTransferPlugin(0);
autopatcherClient.Clear();
packetizedTCP.Stop();
rakPeer->Shutdown(500,0);
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
return 0;
}
void UploadInstanceToCloud(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudKey cloudKey(CLOUD_CLIENT_PRIMARY_KEY,0);
SLNet::BitStream bs;
bs.Write("Hello World"); // This could be anything such as player list, game name, etc.
cloudClient->Post(&cloudKey, bs.GetData(), bs.GetNumberOfBytesUsed(), serverGuid);
}
void GetClientSubscription(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudQuery cloudQuery;
cloudQuery.keys.Push(SLNet::CloudKey(CLOUD_CLIENT_PRIMARY_KEY,0),_FILE_AND_LINE_);
cloudQuery.subscribeToResults=false;
cloudClient->Get(&cloudQuery, serverGuid);
}
void GetServers(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudQuery cloudQuery;
cloudQuery.keys.Push(SLNet::CloudKey("CloudConnCount",0),_FILE_AND_LINE_); // CloudConnCount is defined at the top of CloudServerHelper.cpp
cloudQuery.subscribeToResults=false;
cloudClient->Get(&cloudQuery, serverGuid);
}

View File

@ -0,0 +1,327 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherClient_SelfScaling</ProjectName>
<ProjectGuid>{3B56A136-5D23-4761-89A5-DAFF61EDB1FD}</ProjectGuid>
<RootNamespace>AutopatcherClient_SelfScaling</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp" />
<ClCompile Include="AutopatcherClientTest.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h" />
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Client Files">
<UniqueIdentifier>{d8d68d01-19c5-428f-bb4b-615ea2de4bcc}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{c1835979-c3ee-4c0e-b854-9a2d6d5dc6e1}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2">
<UniqueIdentifier>{88ea0ffa-1848-4b61-b371-6f6641c15118}</UniqueIdentifier>
</Filter>
<Filter Include="BZip2Wrapper">
<UniqueIdentifier>{e87d2f37-da91-45e4-b57d-2b1b02b20013}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp">
<Filter>Client Files</Filter>
</ClCompile>
<ClCompile Include="AutopatcherClientTest.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip2</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>BZip2Wrapper</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h">
<Filter>Client Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip2</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>BZip2Wrapper</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,23 @@
del /Q srvDate
rmdir /S /Q d:\temp2
rmdir /S /Q d:\temp3
rmdir /S /Q d:\temp4
rmdir /S /Q d:\temp5
rmdir /S /Q d:\temp6
rmdir /S /Q d:\temp7
rmdir /S /Q d:\temp8
rmdir /S /Q d:\temp9
rmdir /S /Q d:\temp10
rmdir /S /Q d:\temp11
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp2 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp3 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp4 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp5 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp6 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp7 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp8 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp9 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp10 TestApp 1
Start Debug/AutopatcherClient.exe 127.0.0.1 d:/temp11 TestApp 1

View File

@ -0,0 +1,344 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherServer_PostgreSQL</ProjectName>
<ProjectGuid>{4BDF263B-655B-4F1D-B42F-65260DC688A6}</ProjectGuid>
<RootNamespace>AutopatcherServer_PostgreSQL</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Debug\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Debug - Unicode\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Release\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Retail\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Release - Unicode\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../DependentExtensions/openssl/include/x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;./../../DependentExtensions\Autopatcher\AutopatcherPostgreRepository\Retail - Unicode\AutopatcherPostgreSQLRepository.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="AutopatcherServerTest.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DependentExtensions\Autopatcher\AutopatcherPostgreRepository\AutopatcherPostgreRepository.vcxproj">
<Project>{0fd54bd0-c49c-4681-80ce-aa22b8995ca8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="BZip">
<UniqueIdentifier>{765f1609-6db6-4e37-ba56-6075f30060ab}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{e9ffd4fe-f03b-40c1-b6d4-43febc3e0425}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="AutopatcherServerTest.cpp">
<Filter>Main</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,348 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// Common includes
#include <stdio.h>
#include <stdlib.h>
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/StringCompressor.h"
#include "slikenet/FileListTransfer.h"
#include "slikenet/FileList.h" // FLP_Printf
#include "slikenet/PacketizedTCP.h"
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
// Server only includes
#include "AutopatcherServer.h"
// Replace this repository with your own implementation if you don't want to use PostgreSQL
#include "AutopatcherPostgreRepository.h"
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#endif
#define USE_TCP
#define LISTEN_PORT 60000
#define MAX_INCOMING_CONNECTIONS 128
char WORKING_DIRECTORY[MAX_PATH];
char PATH_TO_XDELTA_EXE[MAX_PATH];
// The default AutopatcherPostgreRepository2 uses bsdiff which takes too much memory for large files.
// I override MakePatch to use XDelta in this case
class AutopatcherPostgreRepository2_WithXDelta : public SLNet::AutopatcherPostgreRepository2
{
int MakePatch(const char *oldFile, const char *newFile, char **patch, unsigned int *patchLength, int *patchAlgorithm)
{
FILE *fpOld;
fopen_s(&fpOld, oldFile, "rb");
fseek(fpOld, 0, SEEK_END);
int contentLengthOld = ftell(fpOld);
FILE *fpNew;
fopen_s(&fpNew, newFile, "rb");
fseek(fpNew, 0, SEEK_END);
int contentLengthNew = ftell(fpNew);
if ((contentLengthOld < 33554432 && contentLengthNew < 33554432) || PATH_TO_XDELTA_EXE[0]==0)
{
// Use bsdiff, which does a good job but takes a lot of memory based on the size of the file
*patchAlgorithm=0;
bool b = MakePatchBSDiff(fpOld, contentLengthOld, fpNew, contentLengthNew, patch, patchLength);
fclose(fpOld);
fclose(fpNew);
return b==false ? -1 : 0;
}
else
{
*patchAlgorithm=1;
fclose(fpOld);
fclose(fpNew);
char buff[128];
SLNet::TimeUS time = SLNet::GetTimeUS();
#if defined(_WIN32)
sprintf_s(buff, "%I64u", time);
#else
sprintf_s(buff, "%llu", (long long unsigned int) time);
#endif
// Invoke xdelta
// See https://code.google.com/p/xdelta/wiki/CommandLineSyntax
char commandLine[512];
_snprintf(commandLine, sizeof(commandLine)-1, "-f -s %s %s patchServer_%s.tmp", oldFile, newFile, buff);
commandLine[511]=0;
SHELLEXECUTEINFOA shellExecuteInfo;
shellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFOA);
shellExecuteInfo.fMask = SEE_MASK_NOASYNC | SEE_MASK_NO_CONSOLE;
shellExecuteInfo.hwnd = nullptr;
shellExecuteInfo.lpVerb = "open";
shellExecuteInfo.lpFile = PATH_TO_XDELTA_EXE;
shellExecuteInfo.lpParameters = commandLine;
shellExecuteInfo.lpDirectory = WORKING_DIRECTORY;
shellExecuteInfo.nShow = SW_SHOWNORMAL;
shellExecuteInfo.hInstApp = nullptr;
ShellExecuteExA(&shellExecuteInfo);
//ShellExecute(nullptr, "open", PATH_TO_XDELTA_EXE, commandLine, WORKING_DIRECTORY, SW_SHOWNORMAL);
char pathToPatch[MAX_PATH];
sprintf_s(pathToPatch, "%s/patchServer_%s.tmp", WORKING_DIRECTORY, buff);
// r+ instead of r, because I want exclusive access in case xdelta is still working
FILE *fpPatch;
errno_t error = fopen_s(&fpPatch, pathToPatch, "r+b");
SLNet::TimeUS stopWaiting = time + 60000000 * 5;
while (error!=0 && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
error = fopen_s(&fpPatch, pathToPatch, "r+b");
}
if (error!=0)
return 1;
fseek(fpPatch, 0, SEEK_END);
*patchLength = ftell(fpPatch);
fseek(fpPatch, 0, SEEK_SET);
*patch = (char*) rakMalloc_Ex(*patchLength, _FILE_AND_LINE_);
fread(*patch, 1, *patchLength, fpPatch);
fclose(fpPatch);
int unlinkRes = _unlink(pathToPatch);
while (unlinkRes!=0 && SLNet::GetTimeUS() < stopWaiting)
{
RakSleep(1000);
unlinkRes = _unlink(pathToPatch);
}
if (unlinkRes!=0) {
char buff2[1024];
strerror_s(buff2, errno);
printf("\nWARNING: unlink %s failed.\nerr=%i (%s)\n", pathToPatch, errno, buff2);
}
return 0;
}
}
};
int main(int, char **)
{
printf("Server starting... ");
SLNet::AutopatcherServer autopatcherServer;
// SLNet::FLP_Printf progressIndicator;
SLNet::FileListTransfer fileListTransfer;
static const int workerThreadCount=4; // Used for checking patches only
static const int sqlConnectionObjectCount=32; // Used for both checking patches and downloading
AutopatcherPostgreRepository2_WithXDelta connectionObject[sqlConnectionObjectCount];
SLNet::AutopatcherRepositoryInterface *connectionObjectAddresses[sqlConnectionObjectCount];
for (int i=0; i < sqlConnectionObjectCount; i++)
connectionObjectAddresses[i]=&connectionObject[i];
// fileListTransfer.AddCallback(&progressIndicator);
autopatcherServer.SetFileListTransferPlugin(&fileListTransfer);
// PostgreSQL is fast, so this may not be necessary, or could use fewer threads
// This is used to read increments of large files concurrently, thereby serving users downloads as other users read from the DB
fileListTransfer.StartIncrementalReadThreads(sqlConnectionObjectCount);
autopatcherServer.SetMaxConurrentUsers(MAX_INCOMING_CONNECTIONS); // More users than this get queued up
SLNet::AutopatcherServerLoadNotifier_Printf loadNotifier;
autopatcherServer.SetLoadManagementCallback(&loadNotifier);
#ifdef USE_TCP
SLNet::PacketizedTCP packetizedTCP;
if (packetizedTCP.Start(LISTEN_PORT,MAX_INCOMING_CONNECTIONS)==false)
{
printf("Failed to start TCP. Is the port already in use?");
return 1;
}
packetizedTCP.AttachPlugin(&autopatcherServer);
packetizedTCP.AttachPlugin(&fileListTransfer);
#else
SLNet::RakPeerInterface *rakPeer;
rakPeer = SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor socketDescriptor(LISTEN_PORT,0);
rakPeer->Startup(MAX_INCOMING_CONNECTIONS,&socketDescriptor, 1);
rakPeer->SetMaximumIncomingConnections(MAX_INCOMING_CONNECTIONS);
rakPeer->AttachPlugin(&autopatcherServer);
rakPeer->AttachPlugin(&fileListTransfer);
#endif
printf("started.\n");
printf("Enter database password:\n");
char connectionString[256],password[128];
char username[256];
strcpy_s(username, "postgres");
gets_s(password);
if (password[0]==0) strcpy_s(password, "aaaa");
strcpy_s(connectionString, "user=");
strcat_s(connectionString, username);
strcat_s(connectionString, " password=");
strcat_s(connectionString, password);
for (int conIdx=0; conIdx < sqlConnectionObjectCount; conIdx++)
{
if (connectionObject[conIdx].Connect(connectionString)==false)
{
printf("Database connection failed.\n");
return 1;
}
}
printf("Database connection suceeded.\n");
printf("Starting threads\n");
// 4 Worker threads, which is CPU intensive
// A greater number of SQL connections, which read files incrementally for large downloads
autopatcherServer.StartThreads(workerThreadCount,sqlConnectionObjectCount, connectionObjectAddresses);
autopatcherServer.CacheMostRecentPatch(0);
// autopatcherServer.SetAllowDownloadOfOriginalUnmodifiedFiles(false);
printf("System ready for connections\n");
// https://code.google.com/p/xdelta/downloads/list
printf("Optional: Enter path to xdelta.exe: ");
Gets(PATH_TO_XDELTA_EXE, sizeof(PATH_TO_XDELTA_EXE));
if (PATH_TO_XDELTA_EXE[0]==0)
strcpy_s(PATH_TO_XDELTA_EXE, "c:/xdelta3-3.0.6-win32.exe");
if (PATH_TO_XDELTA_EXE[0])
{
printf("Enter working directory to store temporary files: ");
Gets(WORKING_DIRECTORY, sizeof(WORKING_DIRECTORY));
if (WORKING_DIRECTORY[0]==0)
GetTempPathA(MAX_PATH, WORKING_DIRECTORY);
if (WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='\\' || WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=='/')
WORKING_DIRECTORY[strlen(WORKING_DIRECTORY)-1]=0;
}
printf("(D)rop database\n(C)reate database.\n(A)dd application\n(U)pdate revision.\n(R)emove application\n(Q)uit\n");
int ch;
SLNet::Packet *p;
for(;;)
{
#ifdef USE_TCP
SLNet::SystemAddress notificationAddress;
notificationAddress=packetizedTCP.HasCompletedConnectionAttempt();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
notificationAddress=packetizedTCP.HasNewIncomingConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_NEW_INCOMING_CONNECTION\n");
notificationAddress=packetizedTCP.HasLostConnection();
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_LOST\n");
p=packetizedTCP.Receive();
while (p)
{
packetizedTCP.DeallocatePacket(p);
p=packetizedTCP.Receive();
}
#else
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_NEW_INCOMING_CONNECTION)
printf("ID_NEW_INCOMING_CONNECTION\n");
else if (p->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION\n");
else if (p->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST\n");
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
#endif
if (_kbhit())
{
ch=_getch();
if (ch=='q')
break;
else if (ch=='c')
{
if (connectionObject[0].CreateAutopatcherTables()==false)
printf("%s", connectionObject[0].GetLastError());
}
else if (ch=='d')
{
if (connectionObject[0].DestroyAutopatcherTables()==false)
printf("%s", connectionObject[0].GetLastError());
}
else if (ch=='a')
{
printf("Enter application name to add: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
if (connectionObject[0].AddApplication(appName, username)==false)
printf("%s", connectionObject[0].GetLastError());
else
printf("Done\n");
}
else if (ch=='r')
{
printf("Enter application name to remove: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
if (connectionObject[0].RemoveApplication(appName)==false)
printf("%s", connectionObject[0].GetLastError());
else
printf("Done\n");
}
else if (ch=='u')
{
printf("Enter application name: ");
char appName[512];
Gets(appName,sizeof(appName));
if (appName[0]==0)
strcpy_s(appName, "TestApp");
printf("Enter application directory: ");
char appDir[512];
Gets(appDir,sizeof(appDir));
if (appDir[0]==0)
strcpy_s(appDir, "D:\\temp");
if (connectionObject[0].UpdateApplicationFiles(appName, appDir, username, 0)==false)
{
printf("%s", connectionObject[0].GetLastError());
}
else
{
printf("Update success.\n");
autopatcherServer.CacheMostRecentPatch(appName);
}
}
}
RakSleep(30);
}
#ifdef USE_TCP
packetizedTCP.Stop();
#else
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
#endif
return 0;
}

View File

@ -0,0 +1,37 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project(AutopatcherServer)
IF(WIN32 AND NOT UNIX)
FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/AutopatcherServer.cpp" "${Autopatcher_SOURCE_DIR}/MemoryCompressor.cpp" "${Autopatcher_SOURCE_DIR}/CreatePatch.cpp" "${Autopatcher_SOURCE_DIR}/AutopatcherServer.h")
FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h")
LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c")
SOURCE_GROUP(BZip FILES ${BZSRC})
SOURCE_GROUP("Source Files" FILES ${AUTOSRC})
SOURCE_GROUP(Main "AutopatcherServerTest.cpp")
include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR})
add_executable(AutopatcherServer_PostgreSQL "AutopatcherServerTest.cpp" ${AUTOSRC} ${BZSRC})
target_link_libraries(AutopatcherServer_PostgreSQL ${SLIKENET_COMMON_LIBS} AutopatcherPostgreRepository)
VSUBFOLDER(AutopatcherServer_PostgreSQL "Samples/AutoPatcher/Server/PostgreSQL")
ELSE(WIN32 AND NOT UNIX)
include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR})
add_executable(AutopatcherServer_PostgreSQL "AutopatcherServerTest.cpp")
target_link_libraries(AutopatcherServer_PostgreSQL ${SLIKENET_COMMON_LIBS} LibAutopatcher AutopatcherPostgreRepository LibPostgreSQLInterface)
ENDIF(WIN32 AND NOT UNIX)

View File

@ -0,0 +1,657 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>AutopatcherServer_SelfScaling</ProjectName>
<ProjectGuid>{FF3A0728-DF9B-4971-AEC5-B1AFCD5A3120}</ProjectGuid>
<RootNamespace>AutopatcherServer_SelfScaling</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer_SelfScaling.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)AutopatcherServer_SelfScaling.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;C:\Program Files (x86)\PostgreSQL\9.2\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;./../../DependentExtensions/Autopatcher/AutopatcherPostgreRepository;./../../DependentExtensions/PostgreSQLInterface;./../../Samples/CloudServer;./../../DependentExtensions/openssl/include/x86;C:\Program Files (x86)\PostgreSQL\9.2\include;$(SolutionDir)DependentExtensions\jansson-2.4\src;./../../DependentExtensions/Rackspace;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;OPEN_SSL_CLIENT_SUPPORT=1;STATICLIB;_RAKNET_SUPPORT_Rackspace2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;F:\SLikeSoft\projects\SLikeNet\external_dependencies\postgresql\9.1.24\x86\lib\libpq.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>../../DependentExtensions/openssl/lib/x86/release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy "C:\Program Files (x86)\PostgreSQL\9.2\bin\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\src\_FindFirst.cpp" />
<ClCompile Include="..\..\Source\src\Base64Encoder.cpp" />
<ClCompile Include="..\..\Source\src\BitStream.cpp" />
<ClCompile Include="..\..\Source\src\CCRakNetSlidingWindow.cpp" />
<ClCompile Include="..\..\Source\src\CCRakNetUDT.cpp" />
<ClCompile Include="..\..\Source\src\CheckSum.cpp" />
<ClCompile Include="..\..\Source\src\CloudClient.cpp" />
<ClCompile Include="..\..\Source\src\CloudCommon.cpp" />
<ClCompile Include="..\..\Source\src\CloudServer.cpp" />
<ClCompile Include="..\..\Source\src\CommandParserInterface.cpp" />
<ClCompile Include="..\..\Source\src\ConnectionGraph2.cpp" />
<ClCompile Include="..\..\Source\src\ConsoleServer.cpp" />
<ClCompile Include="..\..\Source\src\DataCompressor.cpp" />
<ClCompile Include="..\..\Source\src\DirectoryDeltaTransfer.cpp" />
<ClCompile Include="..\..\Source\src\DS_BytePool.cpp" />
<ClCompile Include="..\..\Source\src\DS_ByteQueue.cpp" />
<ClCompile Include="..\..\Source\src\DS_HuffmanEncodingTree.cpp" />
<ClCompile Include="..\..\Source\src\DS_Table.cpp" />
<ClCompile Include="..\..\Source\src\DynDNS.cpp" />
<ClCompile Include="..\..\Source\src\EmailSender.cpp" />
<ClCompile Include="..\..\Source\src\EpochTimeToString.cpp" />
<ClCompile Include="..\..\Source\src\FileList.cpp" />
<ClCompile Include="..\..\Source\src\FileListTransfer.cpp" />
<ClCompile Include="..\..\Source\src\FileOperations.cpp" />
<ClCompile Include="..\..\Source\src\FormatString.cpp" />
<ClCompile Include="..\..\Source\src\FullyConnectedMesh2.cpp" />
<ClCompile Include="..\..\Source\src\Getche.cpp" />
<ClCompile Include="..\..\Source\src\Gets.cpp" />
<ClCompile Include="..\..\Source\src\GetTime.cpp" />
<ClCompile Include="..\..\Source\src\gettimeofday.cpp" />
<ClCompile Include="..\..\Source\src\GridSectorizer.cpp" />
<ClCompile Include="..\..\Source\src\HTTPConnection.cpp" />
<ClCompile Include="..\..\Source\src\HTTPConnection2.cpp" />
<ClCompile Include="..\..\Source\src\IncrementalReadInterface.cpp" />
<ClCompile Include="..\..\Source\src\Itoa.cpp" />
<ClCompile Include="..\..\Source\src\LinuxStrings.cpp" />
<ClCompile Include="..\..\Source\src\LocklessTypes.cpp" />
<ClCompile Include="..\..\Source\src\LogCommandParser.cpp" />
<ClCompile Include="..\..\Source\src\MessageFilter.cpp" />
<ClCompile Include="..\..\Source\src\NatPunchthroughClient.cpp" />
<ClCompile Include="..\..\Source\src\NatPunchthroughServer.cpp" />
<ClCompile Include="..\..\Source\src\NatTypeDetectionClient.cpp" />
<ClCompile Include="..\..\Source\src\NatTypeDetectionCommon.cpp" />
<ClCompile Include="..\..\Source\src\NatTypeDetectionServer.cpp" />
<ClCompile Include="..\..\Source\src\NetworkIDManager.cpp" />
<ClCompile Include="..\..\Source\src\NetworkIDObject.cpp" />
<ClCompile Include="..\..\Source\src\PacketConsoleLogger.cpp" />
<ClCompile Include="..\..\Source\src\PacketFileLogger.cpp" />
<ClCompile Include="..\..\Source\src\PacketizedTCP.cpp" />
<ClCompile Include="..\..\Source\src\PacketLogger.cpp" />
<ClCompile Include="..\..\Source\src\PacketOutputWindowLogger.cpp" />
<ClCompile Include="..\..\Source\src\PluginInterface2.cpp" />
<ClCompile Include="..\..\Source\src\Rackspace.cpp" />
<ClCompile Include="..\..\Source\src\RakMemoryOverride.cpp" />
<ClCompile Include="..\..\Source\src\RakNetCommandParser.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_360_720.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_Berkley.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_NativeClient.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_PS3_PS4.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_Vita.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_Windows_Linux.cpp" />
<ClCompile Include="..\..\Source\src\RakNetSocket2_Windows_Linux_360.cpp" />
<ClCompile Include="..\..\Source\src\RakNetStatistics.cpp" />
<ClCompile Include="..\..\Source\src\RakNetTransport2.cpp" />
<ClCompile Include="..\..\Source\src\RakNetTypes.cpp" />
<ClCompile Include="..\..\Source\src\RakPeer.cpp" />
<ClCompile Include="..\..\Source\src\RakSleep.cpp" />
<ClCompile Include="..\..\Source\src\RakString.cpp" />
<ClCompile Include="..\..\Source\src\RakThread.cpp" />
<ClCompile Include="..\..\Source\src\RakWString.cpp" />
<ClCompile Include="..\..\Source\src\Rand.cpp" />
<ClCompile Include="..\..\Source\src\ReadyEvent.cpp" />
<ClCompile Include="..\..\Source\src\RelayPlugin.cpp" />
<ClCompile Include="..\..\Source\src\ReliabilityLayer.cpp" />
<ClCompile Include="..\..\Source\src\ReplicaManager3.cpp" />
<ClCompile Include="..\..\Source\src\Router2.cpp" />
<ClCompile Include="..\..\Source\src\RPC4Plugin.cpp" />
<ClCompile Include="..\..\Source\src\SecureHandshake.cpp" />
<ClCompile Include="..\..\Source\src\SendToThread.cpp" />
<ClCompile Include="..\..\Source\src\DR_SHA1.cpp" />
<ClCompile Include="..\..\Source\src\SignaledEvent.cpp" />
<ClCompile Include="..\..\Source\src\SimpleMutex.cpp" />
<ClCompile Include="..\..\Source\src\SocketLayer.cpp" />
<ClCompile Include="..\..\Source\src\StatisticsHistory.cpp" />
<ClCompile Include="..\..\Source\src\StringCompressor.cpp" />
<ClCompile Include="..\..\Source\src\StringTable.cpp" />
<ClCompile Include="..\..\Source\src\SuperFastHash.cpp" />
<ClCompile Include="..\..\Source\src\TableSerializer.cpp" />
<ClCompile Include="..\..\Source\src\TCPInterface.cpp" />
<ClCompile Include="..\..\Source\src\TeamBalancer.cpp" />
<ClCompile Include="..\..\Source\src\TeamManager.cpp" />
<ClCompile Include="..\..\Source\src\TelnetTransport.cpp" />
<ClCompile Include="..\..\Source\src\ThreadsafePacketLogger.cpp" />
<ClCompile Include="..\..\Source\src\TwoWayAuthentication.cpp" />
<ClCompile Include="..\..\Source\src\UDPForwarder.cpp" />
<ClCompile Include="..\..\Source\src\UDPProxyClient.cpp" />
<ClCompile Include="..\..\Source\src\UDPProxyCoordinator.cpp" />
<ClCompile Include="..\..\Source\src\UDPProxyServer.cpp" />
<ClCompile Include="..\..\Source\src\VariableDeltaSerializer.cpp" />
<ClCompile Include="..\..\Source\src\VariableListDeltaTracker.cpp" />
<ClCompile Include="..\..\Source\src\VariadicSQLParser.cpp" />
<ClCompile Include="..\..\Source\src\VitaIncludes.cpp" />
<ClCompile Include="..\..\Source\src\WSAStartupSingleton.cpp" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="..\CloudServer\CloudServerHelper.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherPostgreRepository\AutopatcherPostgreRepository.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp" />
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
<ClCompile Include="..\..\DependentExtensions\PostgreSQLInterface\PostgreSQLInterface.cpp" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\dump.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\error.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\load.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\memory.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\pack_unpack.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strconv.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\utf.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\value.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Rackspace\Rackspace2.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\include\slikenet\defineoverrides.h" />
<ClInclude Include="..\..\Source\include\slikenet\_FindFirst.h" />
<ClInclude Include="..\..\Source\include\slikenet\AutopatcherPatchContext.h" />
<ClInclude Include="..\..\Source\include\slikenet\AutopatcherRepositoryInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\Base64Encoder.h" />
<ClInclude Include="..\..\Source\include\slikenet\BitStream.h" />
<ClInclude Include="..\..\Source\include\slikenet\CCRakNetSlidingWindow.h" />
<ClInclude Include="..\..\Source\include\slikenet\CCRakNetUDT.h" />
<ClInclude Include="..\..\Source\include\slikenet\CheckSum.h" />
<ClInclude Include="..\..\Source\include\slikenet\CloudClient.h" />
<ClInclude Include="..\..\Source\include\slikenet\CloudCommon.h" />
<ClInclude Include="..\..\Source\include\slikenet\CloudServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\CommandParserInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\ConnectionGraph2.h" />
<ClInclude Include="..\..\Source\include\slikenet\ConsoleServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\DataCompressor.h" />
<ClInclude Include="..\..\Source\include\slikenet\DirectoryDeltaTransfer.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_BinarySearchTree.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_BPlusTree.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_BytePool.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_ByteQueue.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Hash.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Heap.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTree.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTreeFactory.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTreeNode.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_LinkedList.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_List.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Map.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_MemoryPool.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Multilist.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_OrderedChannelHeap.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_OrderedList.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Queue.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_QueueLinkedList.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_RangeList.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Table.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_ThreadsafeAllocatingQueue.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_Tree.h" />
<ClInclude Include="..\..\Source\include\slikenet\DS_WeightedGraph.h" />
<ClInclude Include="..\..\Source\include\slikenet\DynDNS.h" />
<ClInclude Include="..\..\Source\include\slikenet\EmailSender.h" />
<ClInclude Include="..\..\Source\include\slikenet\EpochTimeToString.h" />
<ClInclude Include="..\..\Source\include\slikenet\Export.h" />
<ClInclude Include="..\..\Source\include\slikenet\FileList.h" />
<ClInclude Include="..\..\Source\include\slikenet\FileListNodeContext.h" />
<ClInclude Include="..\..\Source\include\slikenet\FileListTransfer.h" />
<ClInclude Include="..\..\Source\include\slikenet\FileListTransferCBInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\FileOperations.h" />
<ClInclude Include="..\..\Source\include\slikenet\FormatString.h" />
<ClInclude Include="..\..\Source\include\slikenet\FullyConnectedMesh2.h" />
<ClInclude Include="..\..\Source\include\slikenet\Getche.h" />
<ClInclude Include="..\..\Source\include\slikenet\Gets.h" />
<ClInclude Include="..\..\Source\include\slikenet\GetTime.h" />
<ClInclude Include="..\..\Source\include\slikenet\gettimeofday.h" />
<ClInclude Include="..\..\Source\include\slikenet\GridSectorizer.h" />
<ClInclude Include="..\..\Source\include\slikenet\HTTPConnection.h" />
<ClInclude Include="..\..\Source\include\slikenet\HTTPConnection2.h" />
<ClInclude Include="..\..\Source\include\slikenet\IncrementalReadInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\InternalPacket.h" />
<ClInclude Include="..\..\Source\include\slikenet\Itoa.h" />
<ClInclude Include="..\..\Source\include\slikenet\Kbhit.h" />
<ClInclude Include="..\..\Source\include\slikenet\LinuxStrings.h" />
<ClInclude Include="..\..\Source\include\slikenet\LocklessTypes.h" />
<ClInclude Include="..\..\Source\include\slikenet\LogCommandParser.h" />
<ClInclude Include="..\..\Source\include\slikenet\MessageFilter.h" />
<ClInclude Include="..\..\Source\include\slikenet\MessageIdentifiers.h" />
<ClInclude Include="..\..\Source\include\slikenet\MTUSize.h" />
<ClInclude Include="..\..\Source\include\slikenet\NativeFeatureIncludes.h" />
<ClInclude Include="..\..\Source\include\slikenet\NativeFeatureIncludesOverrides.h" />
<ClInclude Include="..\..\Source\include\slikenet\NativeTypes.h" />
<ClInclude Include="..\..\Source\include\slikenet\NatPunchthroughClient.h" />
<ClInclude Include="..\..\Source\include\slikenet\NatPunchthroughServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionClient.h" />
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionCommon.h" />
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\NetworkIDManager.h" />
<ClInclude Include="..\..\Source\include\slikenet\NetworkIDObject.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketConsoleLogger.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketFileLogger.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketizedTCP.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketLogger.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketOutputWindowLogger.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketPool.h" />
<ClInclude Include="..\..\Source\include\slikenet\PacketPriority.h" />
<ClInclude Include="..\..\Source\include\slikenet\PluginInterface2.h" />
<ClInclude Include="..\..\Source\include\slikenet\PS3Includes.h" />
<ClInclude Include="..\..\Source\include\slikenet\Rackspace.h" />
<ClInclude Include="..\..\Source\include\slikenet\alloca.h" />
<ClInclude Include="..\..\Source\include\slikenet\assert.h" />
<ClInclude Include="..\..\Source\include\slikenet\memoryoverride.h" />
<ClInclude Include="..\..\Source\include\slikenet\commandparser.h" />
<ClInclude Include="..\..\Source\include\slikenet\defines.h" />
<ClInclude Include="..\..\Source\include\slikenet\smartptr.h" />
<ClInclude Include="..\..\Source\include\slikenet\socket.h" />
<ClInclude Include="..\..\Source\include\slikenet\socket2.h" />
<ClInclude Include="..\..\Source\include\slikenet\statistics.h" />
<ClInclude Include="..\..\Source\include\slikenet\time.h" />
<ClInclude Include="..\..\Source\include\slikenet\transport2.h" />
<ClInclude Include="..\..\Source\include\slikenet\types.h" />
<ClInclude Include="..\..\Source\include\slikenet\version.h" />
<ClInclude Include="..\..\Source\include\slikenet\peer.h" />
<ClInclude Include="..\..\Source\include\slikenet\peerinterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\sleep.h" />
<ClInclude Include="..\..\Source\include\slikenet\string.h" />
<ClInclude Include="..\..\Source\include\slikenet\thread.h" />
<ClInclude Include="..\..\Source\include\slikenet\wstring.h" />
<ClInclude Include="..\..\Source\include\slikenet\Rand.h" />
<ClInclude Include="..\..\Source\include\slikenet\ReadyEvent.h" />
<ClInclude Include="..\..\Source\include\slikenet\RefCountedObj.h" />
<ClInclude Include="..\..\Source\include\slikenet\RelayPlugin.h" />
<ClInclude Include="..\..\Source\include\slikenet\ReliabilityLayer.h" />
<ClInclude Include="..\..\Source\include\slikenet\ReplicaEnums.h" />
<ClInclude Include="..\..\Source\include\slikenet\ReplicaManager3.h" />
<ClInclude Include="..\..\Source\include\slikenet\Router2.h" />
<ClInclude Include="..\..\Source\include\slikenet\RPC4Plugin.h" />
<ClInclude Include="..\..\Source\include\slikenet\SecureHandshake.h" />
<ClInclude Include="..\..\Source\include\slikenet\SendToThread.h" />
<ClInclude Include="..\..\Source\include\slikenet\DR_SHA1.h" />
<ClInclude Include="..\..\Source\include\slikenet\SignaledEvent.h" />
<ClInclude Include="..\..\Source\include\slikenet\SimpleMutex.h" />
<ClInclude Include="..\..\Source\include\slikenet\SimpleTCPServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\SingleProducerConsumer.h" />
<ClInclude Include="..\..\Source\include\slikenet\SocketDefines.h" />
<ClInclude Include="..\..\Source\include\slikenet\SocketIncludes.h" />
<ClInclude Include="..\..\Source\include\slikenet\SocketLayer.h" />
<ClInclude Include="..\..\Source\include\slikenet\StatisticsHistory.h" />
<ClInclude Include="..\..\Source\include\slikenet\StringCompressor.h" />
<ClInclude Include="..\..\Source\include\slikenet\StringTable.h" />
<ClInclude Include="..\..\Source\include\slikenet\SuperFastHash.h" />
<ClInclude Include="..\..\Source\include\slikenet\TableSerializer.h" />
<ClInclude Include="..\..\Source\include\slikenet\TCPInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\TeamBalancer.h" />
<ClInclude Include="..\..\Source\include\slikenet\TeamManager.h" />
<ClInclude Include="..\..\Source\include\slikenet\TelnetTransport.h" />
<ClInclude Include="..\..\Source\include\slikenet\ThreadPool.h" />
<ClInclude Include="..\..\Source\include\slikenet\ThreadsafePacketLogger.h" />
<ClInclude Include="..\..\Source\include\slikenet\TransportInterface.h" />
<ClInclude Include="..\..\Source\include\slikenet\TwoWayAuthentication.h" />
<ClInclude Include="..\..\Source\include\slikenet\UDPForwarder.h" />
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyClient.h" />
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyCommon.h" />
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyCoordinator.h" />
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyServer.h" />
<ClInclude Include="..\..\Source\include\slikenet\VariableDeltaSerializer.h" />
<ClInclude Include="..\..\Source\include\slikenet\VariableListDeltaTracker.h" />
<ClInclude Include="..\..\Source\include\slikenet\VariadicSQLParser.h" />
<ClInclude Include="..\..\Source\include\slikenet\VitaIncludes.h" />
<ClInclude Include="..\..\Source\include\slikenet\WindowsIncludes.h" />
<ClInclude Include="..\..\Source\include\slikenet\WSAStartupSingleton.h" />
<ClInclude Include="..\..\Source\include\slikenet\XBox360Includes.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
<ClInclude Include="..\CloudServer\CloudServerHelper.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherPostgreRepository\AutopatcherPostgreRepository.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h" />
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
<ClInclude Include="..\..\DependentExtensions\PostgreSQLInterface\PostgreSQLInterface.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_config.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_private.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\utf.h" />
<ClInclude Include="..\..\DependentExtensions\Rackspace\Rackspace2.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,924 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="RakNet">
<UniqueIdentifier>{9afc94c2-181b-43e9-b7c1-ae647b561f8f}</UniqueIdentifier>
</Filter>
<Filter Include="BZip">
<UniqueIdentifier>{ab2499e2-e635-4448-b73f-6e59fd6864b2}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{5c0491e2-85f5-4192-9fe1-8759ddf58cd8}</UniqueIdentifier>
</Filter>
<Filter Include="CloudServerHelper">
<UniqueIdentifier>{205ea130-a724-4ac4-9cae-9e8e083d8865}</UniqueIdentifier>
</Filter>
<Filter Include="Patcher">
<UniqueIdentifier>{320050c4-5fdf-4384-98a1-7cca800a6575}</UniqueIdentifier>
</Filter>
<Filter Include="jansson">
<UniqueIdentifier>{a34d4176-2573-4614-ae59-df043ba756a4}</UniqueIdentifier>
</Filter>
<Filter Include="Rackspace2">
<UniqueIdentifier>{6d0e5adf-3042-4fab-93ae-bc4b04898be3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\src\_FindFirst.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Base64Encoder.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\BitStream.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CCRakNetSlidingWindow.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CCRakNetUDT.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CheckSum.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CloudClient.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CloudCommon.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CloudServer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\CommandParserInterface.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ConnectionGraph2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ConsoleServer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DataCompressor.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DirectoryDeltaTransfer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DS_BytePool.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DS_ByteQueue.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DS_HuffmanEncodingTree.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DS_Table.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DynDNS.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\EmailSender.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\EpochTimeToString.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\FileList.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\FileListTransfer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\FileOperations.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\FormatString.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\FullyConnectedMesh2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Getche.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Gets.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\GetTime.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\gettimeofday.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\GridSectorizer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\HTTPConnection.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\HTTPConnection2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\IncrementalReadInterface.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Itoa.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\LinuxStrings.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\LocklessTypes.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\LogCommandParser.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\MessageFilter.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NatPunchthroughClient.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NatPunchthroughServer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NatTypeDetectionClient.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NatTypeDetectionCommon.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NatTypeDetectionServer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NetworkIDManager.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\NetworkIDObject.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PacketConsoleLogger.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PacketFileLogger.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PacketizedTCP.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PacketLogger.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PacketOutputWindowLogger.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\PluginInterface2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Rackspace.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakMemoryOverride.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetCommandParser.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_360_720.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_Berkley.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_NativeClient.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_PS3_PS4.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_Vita.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_Windows_Linux.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetSocket2_Windows_Linux_360.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetStatistics.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetTransport2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakNetTypes.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakPeer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakSleep.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakString.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakThread.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RakWString.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Rand.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ReadyEvent.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RelayPlugin.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ReliabilityLayer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ReplicaManager3.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\Router2.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\RPC4Plugin.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SecureHandshake.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SendToThread.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\DR_SHA1.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SignaledEvent.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SimpleMutex.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SocketLayer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\StatisticsHistory.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\StringCompressor.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\StringTable.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\SuperFastHash.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TableSerializer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TCPInterface.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TeamBalancer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TeamManager.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TelnetTransport.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\ThreadsafePacketLogger.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\TwoWayAuthentication.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\UDPForwarder.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\UDPProxyClient.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\UDPProxyCoordinator.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\UDPProxyServer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\VariableDeltaSerializer.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\VariableListDeltaTracker.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\VariadicSQLParser.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\VitaIncludes.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\src\WSAStartupSingleton.cpp">
<Filter>RakNet</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
<Filter>BZip</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="..\CloudServer\CloudServerHelper.cpp">
<Filter>CloudServerHelper</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherPostgreRepository\AutopatcherPostgreRepository.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\CreatePatch.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\PostgreSQLInterface\PostgreSQLInterface.cpp">
<Filter>Patcher</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\dump.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\error.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\load.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\memory.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\pack_unpack.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strconv.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\utf.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\value.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\Rackspace\Rackspace2.cpp">
<Filter>Rackspace2</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\include\slikenet\_FindFirst.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\AutopatcherPatchContext.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\AutopatcherRepositoryInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Base64Encoder.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\BitStream.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CCRakNetSlidingWindow.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CCRakNetUDT.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CheckSum.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CloudClient.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CloudCommon.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CloudServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\CommandParserInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ConnectionGraph2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ConsoleServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DataCompressor.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DirectoryDeltaTransfer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_BinarySearchTree.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_BPlusTree.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_BytePool.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_ByteQueue.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Hash.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Heap.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTree.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTreeFactory.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_HuffmanEncodingTreeNode.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_LinkedList.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_List.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Map.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_MemoryPool.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Multilist.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_OrderedChannelHeap.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_OrderedList.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Queue.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_QueueLinkedList.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_RangeList.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Table.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_ThreadsafeAllocatingQueue.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_Tree.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DS_WeightedGraph.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DynDNS.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\EmailSender.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\EpochTimeToString.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Export.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FileList.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FileListNodeContext.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FileListTransfer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FileListTransferCBInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FileOperations.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FormatString.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\FullyConnectedMesh2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Getche.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Gets.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\GetTime.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\gettimeofday.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\GridSectorizer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\HTTPConnection.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\HTTPConnection2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\IncrementalReadInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\InternalPacket.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Itoa.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Kbhit.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\LinuxStrings.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\LocklessTypes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\LogCommandParser.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\MessageFilter.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\MessageIdentifiers.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\MTUSize.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NativeFeatureIncludes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NativeFeatureIncludesOverrides.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NativeTypes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NatPunchthroughClient.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NatPunchthroughServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionClient.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionCommon.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NatTypeDetectionServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NetworkIDManager.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\NetworkIDObject.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketConsoleLogger.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketFileLogger.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketizedTCP.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketLogger.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketOutputWindowLogger.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketPool.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PacketPriority.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PluginInterface2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\PS3Includes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Rackspace.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\alloca.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\assert.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\memoryoverride.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\commandparser.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\defines.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\defineoverrides.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\smartptr.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\socket.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\socket2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\statistics.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\time.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\transport2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\types.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\version.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\peer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\peerinterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\sleep.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\string.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\thread.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\wstring.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Rand.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ReadyEvent.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\RefCountedObj.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\RelayPlugin.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ReliabilityLayer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ReplicaEnums.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ReplicaManager3.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\Router2.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\RPC4Plugin.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SecureHandshake.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SendToThread.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\DR_SHA1.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SignaledEvent.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SimpleMutex.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SimpleTCPServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SingleProducerConsumer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SocketDefines.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SocketIncludes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SocketLayer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\StatisticsHistory.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\StringCompressor.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\StringTable.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\SuperFastHash.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TableSerializer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TCPInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TeamBalancer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TeamManager.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TelnetTransport.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ThreadPool.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\ThreadsafePacketLogger.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TransportInterface.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\TwoWayAuthentication.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\UDPForwarder.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyClient.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyCommon.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyCoordinator.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\UDPProxyServer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\VariableDeltaSerializer.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\VariableListDeltaTracker.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\VariadicSQLParser.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\VitaIncludes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\WindowsIncludes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\WSAStartupSingleton.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\include\slikenet\XBox360Includes.h">
<Filter>RakNet</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
<Filter>BZip</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
<Filter>BZip</Filter>
</ClInclude>
<ClInclude Include="..\CloudServer\CloudServerHelper.h">
<Filter>CloudServerHelper</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherPostgreRepository\AutopatcherPostgreRepository.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherServer.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\CreatePatch.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\PostgreSQLInterface\PostgreSQLInterface.h">
<Filter>Patcher</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_config.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_private.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\utf.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\Rackspace\Rackspace2.h">
<Filter>Rackspace2</Filter>
</ClInclude>
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,325 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2019, 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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/BitStream.h"
#include <stdlib.h> // For atoi
#include <cstring> // For strlen
#include "slikenet/statistics.h"
#include "slikenet/GetTime.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/MTUSize.h"
#include <stdio.h>
#include "slikenet/Kbhit.h"
#include "slikenet/sleep.h"
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
bool quit;
bool sentPacket=false;
#define BIG_PACKET_SIZE 83296256
using namespace SLNet;
RakPeerInterface *client, *server;
char *text;
int main(void)
{
client=server=0;
text= new char [BIG_PACKET_SIZE];
quit=false;
int ch;
printf("This is a test I use to test the packet splitting capabilities of RakNet\n");
printf("All it does is send a large block of data to the feedback loop\n");
printf("Difficulty: Beginner\n\n");
printf("Enter 's' to run as server, 'c' to run as client, space to run local.\n");
ch=' ';
Gets(text,BIG_PACKET_SIZE);
ch=text[0];
if (ch=='c')
{
client= SLNet::RakPeerInterface::GetInstance();
printf("Working as client\n");
printf("Enter remote IP: ");
Gets(text,BIG_PACKET_SIZE);
if (text[0]==0)
strcpy_s(text, BIG_PACKET_SIZE, "natpunch.slikesoft.com"); // dx in Europe
}
else if (ch=='s')
{
server= SLNet::RakPeerInterface::GetInstance();
printf("Working as server\n");
}
else
{
client= SLNet::RakPeerInterface::GetInstance();
server= SLNet::RakPeerInterface::GetInstance();;
strcpy_s(text, BIG_PACKET_SIZE, "127.0.0.1");
}
// Test IPV6
short socketFamily;
socketFamily=AF_INET;
//socketFamily=AF_INET6;
if (server)
{
server->SetTimeoutTime(5000, SLNet::UNASSIGNED_SYSTEM_ADDRESS);
SLNet::SocketDescriptor socketDescriptor(3000,0);
socketDescriptor.socketFamily=socketFamily;
server->SetMaximumIncomingConnections(4);
StartupResult sr;
sr=server->Startup(4, &socketDescriptor, 1);
if (sr!=RAKNET_STARTED)
{
printf("Server failed to start. Error=%i\n", sr);
return 1;
}
// server->SetPerConnectionOutgoingBandwidthLimit(40000);
printf("Started server on %s\n", server->GetMyBoundAddress().ToString(true));
}
if (client)
{
client->SetTimeoutTime(5000, SLNet::UNASSIGNED_SYSTEM_ADDRESS);
SLNet::SocketDescriptor socketDescriptor(0,0);
socketDescriptor.socketFamily=socketFamily;
StartupResult sr;
sr=client->Startup(4, &socketDescriptor, 1);
if (sr!=RAKNET_STARTED)
{
printf("Client failed to start. Error=%i\n", sr);
return 1;
}
client->SetSplitMessageProgressInterval(10000); // Get ID_DOWNLOAD_PROGRESS notifications
// client->SetPerConnectionOutgoingBandwidthLimit(28800);
printf("Started client on %s\n", client->GetMyBoundAddress().ToString(true));
client->Connect(text, 3000, 0, 0);
}
RakSleep(500);
printf("My IP addresses:\n");
RakPeerInterface *rakPeer;
if (server)
rakPeer=server;
else
rakPeer=client;
for (unsigned int i=0; i < rakPeer->GetNumberOfAddresses(); i++)
{
printf("%u. %s\n", i+1, rakPeer->GetLocalIP(i));
}
// Always apply the network simulator on two systems, never just one, with half the values on each.
// Otherwise the flow control gets confused.
// if (client)
// client->ApplyNetworkSimulator(.01, 0, 0);
// if (server)
// server->ApplyNetworkSimulator(.01, 0, 0);
SLNet::TimeMS start,stop;
SLNet::TimeMS nextStatTime = SLNet::GetTimeMS() + 1000;
SLNet::Packet *packet;
start= SLNet::GetTimeMS();
while (!quit)
{
if (server)
{
for (packet = server->Receive(); packet; server->DeallocatePacket(packet), packet=server->Receive())
{
if (packet->data[0]==ID_NEW_INCOMING_CONNECTION || packet->data[0]==253)
{
printf("Starting send\n");
start= SLNet::GetTimeMS();
// #med - replace BIG_PACKET_SIZE macro with static const
#if BIG_PACKET_SIZE <= 100000
for (int i=0; i < BIG_PACKET_SIZE; i++)
text[i]=255-(i&255);
#else
text[0]=(unsigned char) 255;
#endif
server->Send(text, BIG_PACKET_SIZE, LOW_PRIORITY, RELIABLE_ORDERED_WITH_ACK_RECEIPT, 0, packet->systemAddress, false);
// Keep the stat from updating until the messages move to the thread or it quits right away
nextStatTime= SLNet::GetTimeMS()+1000;
}
if (packet->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_NEW_INCOMING_CONNECTION)
printf("ID_NEW_INCOMING_CONNECTION from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s\n", packet->systemAddress.ToString());
}
if (_kbhit())
{
ch=_getch();
if (ch==' ')
{
printf("Sending medium priority message\n");
char t[1];
t[0]=(unsigned char) 254;
server->Send(t, 1, MEDIUM_PRIORITY, RELIABLE_ORDERED, 1, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
}
if (ch=='q')
quit=true;
}
}
if (client)
{
packet = client->Receive();
while (packet)
{
if (packet->data[0]==ID_DOWNLOAD_PROGRESS)
{
SLNet::BitStream progressBS(packet->data, packet->length, false);
progressBS.IgnoreBits(8); // ID_DOWNLOAD_PROGRESS
unsigned int progress;
unsigned int total;
unsigned int partLength;
// Disable endian swapping on reading this, as it's generated locally in ReliabilityLayer.cpp
progressBS.ReadBits( (unsigned char* ) &progress, BYTES_TO_BITS(sizeof(progress)), true );
progressBS.ReadBits( (unsigned char* ) &total, BYTES_TO_BITS(sizeof(total)), true );
progressBS.ReadBits( (unsigned char* ) &partLength, BYTES_TO_BITS(sizeof(partLength)), true );
printf("Progress: msgID=%i Progress %i/%i Partsize=%i\n",
(unsigned char) packet->data[0],
progress,
total,
partLength);
}
else if (packet->data[0]==255)
{
if (packet->length!=BIG_PACKET_SIZE)
{
printf("Test failed. %i bytes (wrong number of bytes).\n", packet->length);
quit=true;
break;
}
// #med - replace BIG_PACKET_SIZE macro with static const
#if BIG_PACKET_SIZE <= 100000
for (int i=0; i < BIG_PACKET_SIZE; i++)
{
if (packet->data[i]!=255-(i&255))
{
printf("Test failed. %i bytes (bad data).\n", packet->length);
quit=true;
break;
}
}
#endif
if (quit==false)
{
printf("Test succeeded. %i bytes.\n", packet->length);
bool repeat=false;
if (repeat)
{
printf("Rerequesting send.\n");
unsigned char ch2=(unsigned char) 253;
client->Send((const char*) &ch2, 1, MEDIUM_PRIORITY, RELIABLE_ORDERED, 1, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
}
else
{
quit=true;
break;
}
}
}
else if (packet->data[0]==254)
{
printf("Got high priority message.\n");
}
else if (packet->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_NEW_INCOMING_CONNECTION)
printf("ID_NEW_INCOMING_CONNECTION from %s\n", packet->systemAddress.ToString());
else if (packet->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
{
start= SLNet::GetTimeMS();
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s\n", packet->systemAddress.ToString());
}
else if (packet->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
printf("ID_CONNECTION_ATTEMPT_FAILED from %s\n", packet->systemAddress.ToString());
client->DeallocatePacket(packet);
packet = client->Receive();
}
}
if (SLNet::GetTimeMS() > nextStatTime)
{
nextStatTime= SLNet::GetTimeMS()+1000;
RakNetStatistics rssSender;
RakNetStatistics rssReceiver;
if (server)
{
unsigned short numSystems;
server->GetConnectionList(0,&numSystems);
if (numSystems>0)
{
for (unsigned int i=0; i < numSystems; i++)
{
server->GetStatistics(server->GetSystemAddressFromIndex(i), &rssSender);
StatisticsToString(&rssSender, text, BIG_PACKET_SIZE, 2);
printf("==== System %i ====\n", i+1);
printf("%s\n\n", text);
}
}
}
if (client && server==0 && client->GetGUIDFromIndex(0)!=UNASSIGNED_RAKNET_GUID)
{
client->GetStatistics(client->GetSystemAddressFromIndex(0), &rssReceiver);
StatisticsToString(&rssReceiver, text,BIG_PACKET_SIZE, 2);
printf("%s\n\n", text);
}
}
RakSleep(100);
}
stop= SLNet::GetTimeMS();
double seconds = (double)(stop-start)/1000.0;
if (server)
{
RakNetStatistics *rssSender2=server->GetStatistics(server->GetSystemAddressFromIndex(0));
StatisticsToString(rssSender2, text, BIG_PACKET_SIZE, 1);
printf("%s", text);
}
printf("%i bytes per second (%.2f seconds). Press enter to quit\n", (int)((double)(BIG_PACKET_SIZE) / seconds ), seconds) ;
Gets(text,BIG_PACKET_SIZE);
delete []text;
SLNet::RakPeerInterface::DestroyInstance(client);
SLNet::RakPeerInterface::DestroyInstance(server);
return 0;
}

View File

@ -0,0 +1,262 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>BigPacketTest</ProjectName>
<ProjectGuid>{5B38727A-2D86-4235-907D-37A1530392FA}</ProjectGuid>
<RootNamespace>BigPacketTest</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)BigPacketTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)BigPacketTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BigPacketTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BigPacketTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples")

View File

@ -0,0 +1,199 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/GetTime.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include <cstdio>
#include <memory.h>
#include <cstring>
#include <stdlib.h>
#include "slikenet/Rand.h"
#include "slikenet/statistics.h"
#include "slikenet/sleep.h"
#include "slikenet/memoryoverride.h"
#include <stdio.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Gets.h"
#include "slikenet/Kbhit.h"
#include "slikenet/sleep.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
using namespace SLNet;
int main(int, char **)
{
RakPeerInterface *rakPeer;
char str[256];
char ip[32];
unsigned short remotePort, localPort;
SLNet::Packet *packet;
printf("This project tests sending a burst of messages to a remote system.\n");
printf("Difficulty: Beginner\n\n");
rakPeer = SLNet::RakPeerInterface::GetInstance();
printf("Enter remote IP (enter to not connect): ");
Gets(ip, sizeof(ip));
if (ip[0])
{
printf("Enter remote port: ");
Gets(str, sizeof(str));
if (str[0]==0)
strcpy_s(str, "60000");
const int intRemotePort = atoi(str);
if ((intRemotePort < 0) || (intRemotePort > std::numeric_limits<unsigned short>::max())) {
printf("Specified remote port %d is outside valid bounds [0, %u]", intRemotePort, std::numeric_limits<unsigned short>::max());
return 2;
}
remotePort = static_cast<unsigned short>(intRemotePort);
printf("Enter local port: ");
Gets(str, sizeof(str));
if (str[0]==0)
strcpy_s(str, "0");
const int intLocalPort = atoi(str);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 3;
}
localPort = static_cast<unsigned short>(intLocalPort);
SLNet::SocketDescriptor socketDescriptor(localPort,0);
rakPeer->Startup(32, &socketDescriptor, 1);
printf("Connecting...\n");
rakPeer->Connect(ip, remotePort, 0, 0);
}
else
{
printf("Enter local port: ");
Gets(str, sizeof(str));
if (str[0]==0)
strcpy_s(str, "60000");
const int intLocalPort = atoi(str);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 3;
}
localPort = static_cast<unsigned short>(intLocalPort);
SLNet::SocketDescriptor socketDescriptor(localPort,0);
rakPeer->Startup(32, &socketDescriptor, 1);
}
rakPeer->SetMaximumIncomingConnections(32);
printf("'s' to send. ' ' for statistics. 'q' to quit.\n");
for(;;)
{
if (_kbhit())
{
int ch=_getch();
if (ch=='q')
break;
else if (ch==' ')
{
RakNetStatistics *rss;
char message[2048];
rss=rakPeer->GetStatistics(rakPeer->GetSystemAddressFromIndex(0));
StatisticsToString(rss, message, 2048, 2);
printf("%s", message);
}
else if (ch=='s')
{
char msgSizeStr[128], msgCountStr[128];
uint32_t msgSize, msgCount,index;
printf("Enter message size in bytes: ");
Gets(msgSizeStr, sizeof(msgSizeStr));
if (msgSizeStr[0]==0)
msgSize=4096;
else
msgSize=atoi(msgSizeStr);
printf("Enter times to repeatedly send message: ");
Gets(msgCountStr, sizeof(msgCountStr));
if (msgCountStr[0]==0)
msgCount=128;
else
msgCount=atoi(msgCountStr);
SLNet::BitStream bitStream;
for (index=0; index < msgCount; index++)
{
bitStream.Reset();
bitStream.Write((MessageID)ID_USER_PACKET_ENUM);
bitStream.Write(msgSize);
bitStream.Write(index);
bitStream.Write(msgCount);
bitStream.PadWithZeroToByteLength(msgSize);
rakPeer->Send(&bitStream, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, UNASSIGNED_SYSTEM_ADDRESS, true);
}
printf("Sent\n");
}
}
for (packet=rakPeer->Receive(); packet; rakPeer->DeallocatePacket(packet), packet=rakPeer->Receive())
{
switch(packet->data[0])
{
case ID_CONNECTION_REQUEST_ACCEPTED:
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
break;
case ID_NEW_INCOMING_CONNECTION:
printf("ID_NEW_INCOMING_CONNECTION\n");
break;
case ID_NO_FREE_INCOMING_CONNECTIONS:
printf("ID_NO_FREE_INCOMING_CONNECTIONS\n");
break;
case ID_DISCONNECTION_NOTIFICATION:
printf("ID_DISCONNECTION_NOTIFICATION\n");
break;
case ID_CONNECTION_LOST:
printf("ID_CONNECTION_LOST\n");
break;
case ID_CONNECTION_ATTEMPT_FAILED:
printf("Connection attempt failed\n");
break;
case ID_USER_PACKET_ENUM:
{
uint32_t msgSize, msgCount, index;
SLNet::BitStream bitStream(packet->data, packet->length, false);
bitStream.IgnoreBytes(sizeof(MessageID));
bitStream.Read(msgSize);
bitStream.Read(index);
bitStream.Read(msgCount);
printf("%i/%i len=%i", index+1, msgCount, packet->length);
if (msgSize > BITS_TO_BYTES(bitStream.GetReadOffset()) && packet->length!=msgSize)
printf("UNDERLENGTH!\n");
else
printf("\n");
break;
}
default:
printf("Unknown message type %i\n", packet->data[0]);
}
}
RakSleep(30);
}
rakPeer->Shutdown(100);
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
return 1;
}

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>BurstTest</ProjectName>
<ProjectGuid>{983A44EA-1BC8-4C0F-A8C3-9D340E2CA193}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)BurstTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)BurstTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BurstTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{0379303b-13aa-4454-b52c-38077c88ecc9}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{4c724068-fab2-4c11-951d-5587f39b3f64}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BurstTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(BurstTest)
VSUBFOLDER(BurstTest "Internal Tests")

318
Samples/CMakeLists.txt Normal file
View File

@ -0,0 +1,318 @@
#
# 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) 2016, 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.
#
cmake_minimum_required(VERSION 2.6)
option( RAKNET_SAMPLE_AutopatcherClient "" True )
#option( RAKNET_SAMPLE_AutopatcherClientGFx3_0 "" True )
option( RAKNET_SAMPLE_AutopatcherClientRestarter "" True )
option( RAKNET_SAMPLE_AutopatcherServer "" True )
option( RAKNET_SAMPLE_AutoPatcherServer_MySQL "" True )
option( RAKNET_SAMPLE_BigPacketTest "" True )
option( RAKNET_SAMPLE_BurstTest "" True )
option( RAKNET_SAMPLE_Chat_Example "" True )
option( RAKNET_SAMPLE_CloudClient "" True )
option( RAKNET_SAMPLE_CloudServer "" True )
option( RAKNET_SAMPLE_CloudTest "" True )
option( RAKNET_SAMPLE_CommandConsoleClient "" True )
option( RAKNET_SAMPLE_CommandConsoleServer "" True )
option( RAKNET_SAMPLE_ComprehensivePCGame "" True )
option( RAKNET_SAMPLE_ComprehensiveTest "" True )
#option( RAKNET_SAMPLE_CrashRelauncher "" True )
option( RAKNET_SAMPLE_CrashReporter "" True )
option( RAKNET_SAMPLE_CrossConnectionTest "" True )
option( RAKNET_SAMPLE_DirectoryDeltaTransfer "" True )
option( RAKNET_SAMPLE_Dropped_Connection_Test "" True )
option( RAKNET_SAMPLE_Encryption "" True )
option( RAKNET_SAMPLE_FCMHost "" True )
option( RAKNET_SAMPLE_FCMHostSimultaneous "" True )
option( RAKNET_SAMPLE_FCMVerifiedJoinSimultaneous "" True )
option( RAKNET_SAMPLE_FileListTransfer "" True )
option( RAKNET_SAMPLE_Flow_Control_Test "" True )
option( RAKNET_SAMPLE_Fully_Connected_Mesh "" True )
#option( RAKNET_SAMPLE_GFWL "" True )
#option( RAKNET_SAMPLE_iOS "" True )
option( RAKNET_SAMPLE_LANServerDiscovery "" True )
option( RAKNET_SAMPLE_Lobby2Client "" True )
#option( RAKNET_SAMPLE_Lobby2ClientGFx3_0 "" True )
#option( RAKNET_SAMPLE_Lobby2Client_PS3 "" True )
#option( RAKNET_SAMPLE_Lobby2Server_PGSQL "" True )
#option( RAKNET_SAMPLE_LobbyDB_PostgreSQL "" True )
#option( RAKNET_SAMPLE_LoopbackPerformanceTest "" True )
#option( RAKNET_SAMPLE_Marmalade "" True )
option( RAKNET_SAMPLE_MasterServer "" True )
option( RAKNET_SAMPLE_MessageFilter "" True )
option( RAKNET_SAMPLE_MessageSizeTest "" True )
option( RAKNET_SAMPLE_NATCompleteClient "" True )
option( RAKNET_SAMPLE_NATCompleteServer "" True )
option( RAKNET_SAMPLE_OfflineMessagesTest "" True )
option( RAKNET_SAMPLE_PacketLogger "" True )
option( RAKNET_SAMPLE_PHPDirectoryServer2 "" True )
option( RAKNET_SAMPLE_Ping "" True )
#option( RAKNET_SAMPLE_PS3 "" True )
option( RAKNET_SAMPLE_RackspaceConsole "" True )
option( RAKNET_SAMPLE_RakVoice "" True )
option( RAKNET_SAMPLE_RakVoiceDSound "" True )
option( RAKNET_SAMPLE_RakVoiceFMOD "" True )
#option( RAKNET_SAMPLE_RakVoiceFMODAsDLL "" True )
#option( RAKNET_SAMPLE_RankingServerDB "" True )
#option( RAKNET_SAMPLE_RankingServerDBTest "" True )
#option( RAKNET_SAMPLE_ReadyEvent "" True )
option( RAKNET_SAMPLE_Reliable_Ordered_Test "" True )
option( RAKNET_SAMPLE_ReplicaManager3 "" True )
#option( RAKNET_SAMPLE_Rooms "" True )
#option( RAKNET_SAMPLE_RoomsBrowserGFx3 "" True )
option( RAKNET_SAMPLE_Router2 "" True )
option( RAKNET_SAMPLE_RPC3 "" True )
option( RAKNET_SAMPLE_RPC4 "" True )
option( RAKNET_SAMPLE_SendEmail "" True )
option( RAKNET_SAMPLE_ServerClientTest2 "" True )
option( RAKNET_SAMPLE_StatisticsHistoryTest "" True )
#option( RAKNET_SAMPLE_SteamLobby "" True )
option( RAKNET_SAMPLE_TeamManager "" True )
option( RAKNET_SAMPLE_TestDLL "" True )
option( RAKNET_SAMPLE_Tests "" True )
option( RAKNET_SAMPLE_ThreadTest "" True )
option( RAKNET_SAMPLE_Timestamping "" True )
option( RAKNET_SAMPLE_TitleValidationDB_PostgreSQL "" True )
option( RAKNET_SAMPLE_TwoWayAuthentication "" True )
option( RAKNET_SAMPLE_UDPForwarder "" True )
#option( RAKNET_SAMPLE_Vita "" True )
#option( RAKNET_SAMPLE_XBOX360 "" True )
if(RAKNET_SAMPLE_AutopatcherClient)
add_subdirectory("AutopatcherClient")
endif()
if(RAKNET_SAMPLE_AutopatcherClientGFx3_0)
#add_subdirectory("AutopatcherClientGFx3.0")
endif()
if(RAKNET_SAMPLE_AutopatcherClientRestarter)
add_subdirectory("AutopatcherClientRestarter")
endif()
if(RAKNET_SAMPLE_AutopatcherServer)
add_subdirectory("AutopatcherServer")
endif()
if(RAKNET_SAMPLE_AutoPatcherServer_MySQL)
add_subdirectory("AutoPatcherServer_MySQL")
endif()
if(RAKNET_SAMPLE_BigPacketTest)
add_subdirectory("BigPacketTest")
endif()
if(RAKNET_SAMPLE_BurstTest)
add_subdirectory("BurstTest")
endif()
if(RAKNET_SAMPLE_Chat_Example)
add_subdirectory("ChatExample")
endif()
if(RAKNET_SAMPLE_CloudClient)
add_subdirectory("CloudClient")
endif()
if(RAKNET_SAMPLE_CloudServer)
add_subdirectory("CloudServer")
endif()
if(RAKNET_SAMPLE_CloudTest)
add_subdirectory("CloudTest")
endif()
if(RAKNET_SAMPLE_CommandConsoleClient)
add_subdirectory("CommandConsoleClient")
endif()
if(RAKNET_SAMPLE_CommandConsoleServer)
add_subdirectory("CommandConsoleServer")
endif()
if(RAKNET_SAMPLE_ComprehensivePCGame)
add_subdirectory("ComprehensivePCGame")
endif()
if(RAKNET_SAMPLE_ComprehensiveTest)
add_subdirectory("ComprehensiveTest")
endif()
if(RAKNET_SAMPLE_CrashRelauncher)
#add_subdirectory("CrashRelauncher")
endif()
if(RAKNET_SAMPLE_CrashReporter)
add_subdirectory("CrashReporter")
endif()
if(RAKNET_SAMPLE_CrossConnectionTest)
add_subdirectory("CrossConnectionTest")
endif()
if(RAKNET_SAMPLE_DirectoryDeltaTransfer)
add_subdirectory("DirectoryDeltaTransfer")
endif()
if(RAKNET_SAMPLE_Dropped_Connection_Test)
add_subdirectory("DroppedConnectionTest")
endif()
if(RAKNET_SAMPLE_Encryption)
add_subdirectory("Encryption")
endif()
if(RAKNET_SAMPLE_FCMHost)
add_subdirectory("FCMHost")
endif()
if(RAKNET_SAMPLE_FCMHostSimultaneous)
add_subdirectory("FCMHostSimultaneous")
endif()
if(RAKNET_SAMPLE_FCMVerifiedJoinSimultaneous)
add_subdirectory("FCMVerifiedJoinSimultaneous")
endif()
if(RAKNET_SAMPLE_FileListTransfer)
add_subdirectory("FileListTransfer")
endif()
if(RAKNET_SAMPLE_Flow_Control_Test)
add_subdirectory("FlowControlTest")
endif()
if(RAKNET_SAMPLE_Fully_Connected_Mesh)
add_subdirectory("FullyConnectedMesh")
endif()
if(RAKNET_SAMPLE_GFWL)
#add_subdirectory("GFWL")
endif()
if(RAKNET_SAMPLE_iOS)
#add_subdirectory("iOS")
endif()
if(RAKNET_SAMPLE_LANServerDiscovery)
add_subdirectory("LANServerDiscovery")
endif()
if(RAKNET_SAMPLE_Lobby2Client)
add_subdirectory("Lobby2Client")
endif()
if(RAKNET_SAMPLE_Lobby2ClientGFx3_0)
#add_subdirectory("Lobby2ClientGFx3.0")
endif()
if(RAKNET_SAMPLE_Lobby2Client_PS3)
#add_subdirectory("Lobby2Client_PS3")
endif()
if(RAKNET_SAMPLE_Lobby2Server_PGSQL)
#add_subdirectory("Lobby2Server_PGSQL")
endif()
if(RAKNET_SAMPLE_LobbyDB_PostgreSQL)
#add_subdirectory("LobbyDB_PostgreSQL")
endif()
if(RAKNET_SAMPLE_LoopbackPerformanceTest)
#add_subdirectory("LoopbackPerformanceTest")
endif()
if(RAKNET_SAMPLE_Marmalade)
#add_subdirectory("Marmalade")
endif()
if(RAKNET_SAMPLE_MasterServer)
add_subdirectory("MasterServer")
endif()
if(RAKNET_SAMPLE_MessageFilter)
add_subdirectory("MessageFilter")
endif()
if(RAKNET_SAMPLE_MessageSizeTest)
add_subdirectory("MessageSizeTest")
endif()
if(RAKNET_SAMPLE_NATCompleteClient)
add_subdirectory("NATCompleteClient")
endif()
if(RAKNET_SAMPLE_NATCompleteServer)
add_subdirectory("NATCompleteServer")
endif()
if(RAKNET_SAMPLE_OfflineMessagesTest)
add_subdirectory("OfflineMessagesTest")
endif()
if(RAKNET_SAMPLE_PacketLogger)
add_subdirectory("PacketLogger")
endif()
if(RAKNET_SAMPLE_PHPDirectoryServer2)
add_subdirectory("PHPDirectoryServer2")
endif()
if(RAKNET_SAMPLE_Ping)
add_subdirectory("Ping")
endif()
if(RAKNET_SAMPLE_PS3)
#add_subdirectory("PS3")
endif()
if(RAKNET_SAMPLE_RackspaceConsole)
add_subdirectory("RackspaceConsole")
endif()
if(RAKNET_SAMPLE_RakVoice)
add_subdirectory("RakVoice")
endif()
if(RAKNET_SAMPLE_RakVoiceDSound)
add_subdirectory("RakVoiceDSound")
endif()
if(RAKNET_SAMPLE_RakVoiceFMOD)
add_subdirectory("RakVoiceFMOD")
endif()
if(RAKNET_SAMPLE_RakVoiceFMODAsDLL)
#add_subdirectory("RakVoiceFMODAsDLL")
endif()
if(RAKNET_SAMPLE_RankingServerDB)
#add_subdirectory("RankingServerDB")
endif()
if(RAKNET_SAMPLE_RankingServerDBTest)
#add_subdirectory("RankingServerDBTest")
endif()
if(RAKNET_SAMPLE_ReadyEvent)
#add_subdirectory("ReadyEvent")
endif()
if(RAKNET_SAMPLE_Reliable_Ordered_Test)
add_subdirectory("ReliableOrderedTest")
endif()
if(RAKNET_SAMPLE_ReplicaManager3)
add_subdirectory("ReplicaManager3")
endif()
if(RAKNET_SAMPLE_Rooms)
#add_subdirectory("Rooms")
endif()
if(RAKNET_SAMPLE_RoomsBrowserGFx3)
#add_subdirectory("RoomsBrowserGFx3")
endif()
if(RAKNET_SAMPLE_Router2)
add_subdirectory("Router2")
endif()
if(RAKNET_SAMPLE_RPC3)
add_subdirectory("RPC3")
endif()
if(RAKNET_SAMPLE_RPC4)
add_subdirectory("RPC4")
endif()
if(RAKNET_SAMPLE_SendEmail)
add_subdirectory("SendEmail")
endif()
if(RAKNET_SAMPLE_ServerClientTest2)
add_subdirectory("ServerClientTest2")
endif()
if(RAKNET_SAMPLE_StatisticsHistoryTest)
add_subdirectory("StatisticsHistoryTest")
endif()
if(RAKNET_SAMPLE_SteamLobby)
#add_subdirectory("SteamLobby")
endif()
if(RAKNET_SAMPLE_TeamManager)
add_subdirectory("TeamManager")
endif()
if(RAKNET_SAMPLE_TestDLL)
add_subdirectory("TestDLL")
endif()
if(RAKNET_SAMPLE_Tests)
add_subdirectory("Tests")
endif()
if(RAKNET_SAMPLE_ThreadTest)
add_subdirectory("ThreadTest")
endif()
if(RAKNET_SAMPLE_Timestamping)
add_subdirectory("Timestamping")
endif()
if(RAKNET_SAMPLE_TitleValidationDB_PostgreSQL)
add_subdirectory("TitleValidationDB_PostgreSQL")
endif()
if(RAKNET_SAMPLE_TwoWayAuthentication)
add_subdirectory("TwoWayAuthentication")
endif()
if(RAKNET_SAMPLE_UDPForwarder)
add_subdirectory("UDPForwarder")
endif()
if(RAKNET_SAMPLE_Vita)
#add_subdirectory("Vita")
endif()
if(RAKNET_SAMPLE_XBOX360)
#add_subdirectory("XBOX360")
endif()

View File

@ -0,0 +1,28 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
project("Chat Example")
include_directories(${SLIKENET_HEADER_FILES} ./)
add_executable(ChatServer "Server/Chat Example Server.cpp")
add_executable(ChatClient "Client/Chat Example Client.cpp")
target_link_libraries(ChatServer ${SLIKENET_COMMON_LIBS})
VSUBFOLDER(ChatServer "Samples")
target_link_libraries(ChatClient ${SLIKENET_COMMON_LIBS})
VSUBFOLDER(ChatClient "Samples")

View File

@ -0,0 +1,367 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2019, 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.
*/
// ----------------------------------------------------------------------
// RakNet version 1.0
// Filename ChatExample.cpp
// Very basic chat engine example
// ----------------------------------------------------------------------
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/peerinterface.h"
#include "slikenet/statistics.h"
#include "slikenet/types.h"
#include "slikenet/BitStream.h"
#include "slikenet/PacketLogger.h"
#include <assert.h>
#include <cstdio>
#include <cstring>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/types.h"
#include "slikenet/Kbhit.h"
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#endif
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#if LIBCAT_SECURITY==1
#include "slikenet/SecureHandshake.h" // Include header for secure handshake
#endif
// We copy this from Multiplayer.cpp to keep things all in one file for this example
unsigned char GetPacketIdentifier(SLNet::Packet *p);
int main(void)
{
SLNet::RakNetStatistics *rss;
// Pointers to the interfaces of our server and client.
// Note we can easily have both in the same program
SLNet::RakPeerInterface *client= SLNet::RakPeerInterface::GetInstance();
// client->InitializeSecurity(0,0,0,0);
//SLNet::PacketLogger packetLogger;
//client->AttachPlugin(&packetLogger);
// Holds packets
SLNet::Packet* p;
// GetPacketIdentifier returns this
unsigned char packetIdentifier;
// Just so we can remember where the packet came from
bool isServer;
// Record the first client that connects to us so we can pass it to the ping function
SLNet::SystemAddress clientID= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
// Crude interface
// Holds user data
char ip[64], serverPort[30], clientPort[30];
// A client
isServer=false;
printf("This is a sample implementation of a text based chat client.\n");
printf("Connect to the project 'Chat Example Server'.\n");
printf("Difficulty: Beginner\n\n");
// Get our input
puts("Enter the client port to listen on");
Gets(clientPort,sizeof(clientPort));
if (clientPort[0]==0)
strcpy_s(clientPort, "0");
const int intClientPort = atoi(clientPort);
if ((intClientPort < 0) || (intClientPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified client port %d is outside valid bounds [0, %u]", intClientPort, std::numeric_limits<unsigned short>::max());
return 1;
}
puts("Enter IP to connect to");
Gets(ip, sizeof(ip));
client->AllowConnectionResponseIPMigration(false);
if (ip[0]==0)
strcpy_s(ip, "127.0.0.1");
// strcpy_s(ip, "natpunch.slikesoft.com");
puts("Enter the port to connect to");
Gets(serverPort,sizeof(serverPort));
if (serverPort[0]==0)
strcpy_s(serverPort, "1234");
int intServerPort = atoi(serverPort);
if ((intServerPort < 0) || (intServerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified server port %d is outside valid bounds [0, %u]", intServerPort, std::numeric_limits<unsigned short>::max());
return 2;
}
// Connecting the client is very simple. 0 means we don't care about
// a connectionValidationInteger, and false for low priority threads
SLNet::SocketDescriptor socketDescriptor(static_cast<unsigned short>(intClientPort),0);
socketDescriptor.socketFamily=AF_INET;
client->Startup(8,&socketDescriptor, 1);
client->SetOccasionalPing(true);
#if LIBCAT_SECURITY==1
char public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES];
FILE *fp;
fopen_s(&fp,"publicKey.dat","rb");
fread(public_key,sizeof(public_key),1,fp);
fclose(fp);
SLNet::PublicKey pk;
pk.remoteServerPublicKey=public_key;
pk.publicKeyMode= SLNet::PKM_USE_KNOWN_PUBLIC_KEY;
client->Connect(ip, static_cast<unsigned short>(intServerPort), "Rumpelstiltskin", (int) strlen("Rumpelstiltskin"), &pk);
#else
SLNet::ConnectionAttemptResult car = client->Connect(ip, static_cast<unsigned short>(intServerPort), "Rumpelstiltskin", (int) strlen("Rumpelstiltskin"));
RakAssert(car== SLNet::CONNECTION_ATTEMPT_STARTED);
#endif
printf("\nMy IP addresses:\n");
unsigned int i;
for (i=0; i < client->GetNumberOfAddresses(); i++)
{
printf("%i. %s\n", i+1, client->GetLocalIP(i));
}
printf("My GUID is %s\n", client->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
puts("'quit' to quit. 'stat' to show stats. 'ping' to ping.\n'disconnect' to disconnect. 'connect' to reconnnect. Type to talk.");
char message[2048];
// Loop for input
for(;;)
{
// This sleep keeps RakNet responsive
#ifdef _WIN32
Sleep(30);
#else
usleep(30 * 1000);
#endif
if (_kbhit())
{
// Notice what is not here: something to keep our network running. It's
// fine to block on Gets or anything we want
// Because the network engine was painstakingly written using threads.
Gets(message,sizeof(message));
if (strcmp(message, "quit")==0)
{
puts("Quitting.");
break;
}
if (strcmp(message, "stat")==0)
{
rss=client->GetStatistics(client->GetSystemAddressFromIndex(0));
StatisticsToString(rss, message, 2048, 2);
printf("%s", message);
printf("Ping=%i\n", client->GetAveragePing(client->GetSystemAddressFromIndex(0)));
continue;
}
if (strcmp(message, "disconnect")==0)
{
printf("Enter index to disconnect: ");
char str[32];
Gets(str, sizeof(str));
if (str[0]==0)
strcpy_s(str,"0");
int index = atoi(str);
client->CloseConnection(client->GetSystemAddressFromIndex(index),false);
printf("Disconnecting.\n");
continue;
}
if (strcmp(message, "shutdown")==0)
{
client->Shutdown(100);
printf("Shutdown.\n");
continue;
}
if (strcmp(message, "startup")==0)
{
bool b = client->Startup(8,&socketDescriptor, 1)== SLNet::RAKNET_STARTED;
if (b)
printf("Started.\n");
else
printf("Startup failed.\n");
continue;
}
if (strcmp(message, "connect")==0)
{
printf("Enter server ip: ");
Gets(ip, sizeof(ip));
if (ip[0]==0)
strcpy_s(ip, "127.0.0.1");
printf("Enter server port: ");
Gets(serverPort,sizeof(serverPort));
if (serverPort[0]==0)
strcpy_s(serverPort, "1234");
intServerPort = atoi(serverPort);
if ((intServerPort < 0) || (intServerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified server port %d is outside valid bounds [0, %u]", intServerPort, std::numeric_limits<unsigned short>::max());
return 2;
}
#if LIBCAT_SECURITY==1
bool b = client->Connect(ip, static_cast<unsigned short>(intServerPort), "Rumpelstiltskin", (int) strlen("Rumpelstiltskin"), &pk)== SLNet::CONNECTION_ATTEMPT_STARTED;
#else
bool b = client->Connect(ip, static_cast<unsigned short>(intServerPort), "Rumpelstiltskin", (int) strlen("Rumpelstiltskin"))== SLNet::CONNECTION_ATTEMPT_STARTED;
#endif
if (b)
puts("Attempting connection");
else
{
puts("Bad connection attempt. Terminating.");
exit(1);
}
continue;
}
if (strcmp(message, "ping")==0)
{
if (client->GetSystemAddressFromIndex(0)!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
client->Ping(client->GetSystemAddressFromIndex(0));
continue;
}
if (strcmp(message, "getlastping")==0)
{
if (client->GetSystemAddressFromIndex(0)!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("Last ping is %i\n", client->GetLastPing(client->GetSystemAddressFromIndex(0)));
continue;
}
// message is the data to send
// strlen(message)+1 is to send the null-terminator
// HIGH_PRIORITY doesn't actually matter here because we don't use any other priority
// RELIABLE_ORDERED means make sure the message arrives in the right order
client->Send(message, (int) strlen(message)+1, HIGH_PRIORITY, RELIABLE_ORDERED, 0, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
}
// Get a packet from either the server or the client
for (p=client->Receive(); p; client->DeallocatePacket(p), p=client->Receive())
{
// We got a packet, get the identifier with our handy function
packetIdentifier = GetPacketIdentifier(p);
// Check if this is a network message packet
switch (packetIdentifier)
{
case ID_DISCONNECTION_NOTIFICATION:
// Connection lost normally
printf("ID_DISCONNECTION_NOTIFICATION\n");
break;
case ID_ALREADY_CONNECTED:
// Connection lost normally
printf("ID_ALREADY_CONNECTED with guid %" PRINTF_64_BIT_MODIFIER "u\n", p->guid.g);
break;
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
printf("ID_INCOMPATIBLE_PROTOCOL_VERSION\n");
break;
case ID_REMOTE_DISCONNECTION_NOTIFICATION: // Server telling the clients of another client disconnecting gracefully. You can manually broadcast this in a peer to peer enviroment if you want.
printf("ID_REMOTE_DISCONNECTION_NOTIFICATION\n");
break;
case ID_REMOTE_CONNECTION_LOST: // Server telling the clients of another client disconnecting forcefully. You can manually broadcast this in a peer to peer enviroment if you want.
printf("ID_REMOTE_CONNECTION_LOST\n");
break;
case ID_REMOTE_NEW_INCOMING_CONNECTION: // Server telling the clients of another client connecting. You can manually broadcast this in a peer to peer enviroment if you want.
printf("ID_REMOTE_NEW_INCOMING_CONNECTION\n");
break;
case ID_CONNECTION_BANNED: // Banned from this server
printf("We are banned from this server.\n");
break;
case ID_CONNECTION_ATTEMPT_FAILED:
printf("Connection attempt failed\n");
break;
case ID_NO_FREE_INCOMING_CONNECTIONS:
// Sorry, the server is full. I don't do anything here but
// A real app should tell the user
printf("ID_NO_FREE_INCOMING_CONNECTIONS\n");
break;
case ID_INVALID_PASSWORD:
printf("ID_INVALID_PASSWORD\n");
break;
case ID_CONNECTION_LOST:
// Couldn't deliver a reliable packet - i.e. the other system was abnormally
// terminated
printf("ID_CONNECTION_LOST\n");
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
// This tells the client they have connected
printf("ID_CONNECTION_REQUEST_ACCEPTED to %s with GUID %s\n", p->systemAddress.ToString(true), p->guid.ToString());
printf("My external address is %s\n", client->GetExternalID(p->systemAddress).ToString(true));
break;
case ID_CONNECTED_PING:
case ID_UNCONNECTED_PING:
printf("Ping from %s\n", p->systemAddress.ToString(true));
break;
default:
// It's a client, so just show the message
printf("%s\n", p->data);
break;
}
}
}
// Be nice and let the server know we quit.
client->Shutdown(300);
// We're done with the network
SLNet::RakPeerInterface::DestroyInstance(client);
return 0;
}
// Copied from Multiplayer.cpp
// If the first byte is ID_TIMESTAMP, then we want the 5th byte
// Otherwise we want the 1st byte
unsigned char GetPacketIdentifier(SLNet::Packet *p)
{
if (p==0)
return 255;
if ((unsigned char)p->data[0] == ID_TIMESTAMP)
{
RakAssert(p->length > sizeof(SLNet::MessageID) + sizeof(SLNet::Time));
return (unsigned char) p->data[sizeof(SLNet::MessageID) + sizeof(SLNet::Time)];
}
else
return (unsigned char) p->data[0];
}

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Chat Example Client</ProjectName>
<ProjectGuid>{6DC7ADD5-3506-4922-83C8-192196B1FA2C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Chat Example Client.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Chat Example Client.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Chat Example Client.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<Private>true</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header">
<UniqueIdentifier>{c7063128-07b3-4105-b1bb-95380e53c10e}</UniqueIdentifier>
</Filter>
<Filter Include="Source">
<UniqueIdentifier>{1a78ec27-f9b2-4b79-9fd5-169c405de542}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Chat Example Client.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,345 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2019, 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.
*/
// ----------------------------------------------------------------------
// RakNet version 1.0
// Filename ChatExample.cpp
// Very basic chat engine example
// ----------------------------------------------------------------------
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/peerinterface.h"
#include "slikenet/statistics.h"
#include "slikenet/types.h"
#include "slikenet/BitStream.h"
#include "slikenet/sleep.h"
#include "slikenet/PacketLogger.h"
#include <assert.h>
#include <cstdio>
#include <cstring>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Kbhit.h"
#include <stdio.h>
#include <string.h>
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#if LIBCAT_SECURITY==1
#include "slikenet/SecureHandshake.h" // Include header for secure handshake
#endif
#if defined(_CONSOLE_2)
#include "Console2SampleIncludes.h"
#endif
// We copy this from Multiplayer.cpp to keep things all in one file for this example
unsigned char GetPacketIdentifier(SLNet::Packet *p);
#ifdef _CONSOLE_2
_CONSOLE_2_SetSystemProcessParams
#endif
int main(void)
{
// Pointers to the interfaces of our server and client.
// Note we can easily have both in the same program
SLNet::RakPeerInterface *server= SLNet::RakPeerInterface::GetInstance();
SLNet::RakNetStatistics *rss;
server->SetIncomingPassword("Rumpelstiltskin", (int)strlen("Rumpelstiltskin"));
server->SetTimeoutTime(30000, SLNet::UNASSIGNED_SYSTEM_ADDRESS);
// SLNet::PacketLogger packetLogger;
// server->AttachPlugin(&packetLogger);
#if LIBCAT_SECURITY==1
cat::EasyHandshake handshake;
char public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES];
char private_key[cat::EasyHandshake::PRIVATE_KEY_BYTES];
handshake.GenerateServerKey(public_key, private_key);
server->InitializeSecurity(public_key, private_key, false);
FILE *fp;
fopen_s(&fp,"publicKey.dat","wb");
fwrite(public_key,sizeof(public_key),1,fp);
fclose(fp);
#endif
// Holds packets
SLNet::Packet* p;
// GetPacketIdentifier returns this
unsigned char packetIdentifier;
// Record the first client that connects to us so we can pass it to the ping function
SLNet::SystemAddress clientID= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
// Holds user data
char portstring[30];
printf("This is a sample implementation of a text based chat server.\n");
printf("Connect to the project 'Chat Example Client'.\n");
printf("Difficulty: Beginner\n\n");
// A server
puts("Enter the server port to listen on");
Gets(portstring,sizeof(portstring));
if (portstring[0]==0)
strcpy_s(portstring, "1234");
const int intServerPort = atoi(portstring);
if ((intServerPort < 0) || (intServerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified server port %d is outside valid bounds [0, %u]", intServerPort, std::numeric_limits<unsigned short>::max());
return 1;
}
puts("Starting server.");
// Starting the server is very simple. 2 players allowed.
// 0 means we don't care about a connectionValidationInteger, and false
// for low priority threads
// I am creating two socketDesciptors, to create two sockets. One using IPV6 and the other IPV4
SLNet::SocketDescriptor socketDescriptors[2];
socketDescriptors[0].port=static_cast<unsigned short>(intServerPort);
socketDescriptors[0].socketFamily=AF_INET; // Test out IPV4
socketDescriptors[1].port=static_cast<unsigned short>(intServerPort);
socketDescriptors[1].socketFamily=AF_INET6; // Test out IPV6
bool b = server->Startup(4, socketDescriptors, 2 )== SLNet::RAKNET_STARTED;
server->SetMaximumIncomingConnections(4);
if (!b)
{
printf("Failed to start dual IPV4 and IPV6 ports. Trying IPV4 only.\n");
// Try again, but leave out IPV6
b = server->Startup(4, socketDescriptors, 1 )== SLNet::RAKNET_STARTED;
if (!b)
{
puts("Server failed to start. Terminating.");
exit(1);
}
}
server->SetOccasionalPing(true);
server->SetUnreliableTimeout(1000);
DataStructures::List< SLNet::RakNetSocket2* > sockets;
server->GetSockets(sockets);
printf("Socket addresses used by RakNet:\n");
for (unsigned int i=0; i < sockets.Size(); i++)
{
printf("%i. %s\n", i+1, sockets[i]->GetBoundAddress().ToString(true));
}
printf("\nMy IP addresses:\n");
for (unsigned int i=0; i < server->GetNumberOfAddresses(); i++)
{
SLNet::SystemAddress sa = server->GetInternalID(SLNet::UNASSIGNED_SYSTEM_ADDRESS, i);
printf("%i. %s (LAN=%i)\n", i+1, sa.ToString(false), sa.IsLANAddress());
}
printf("\nMy GUID is %s\n", server->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
puts("'quit' to quit. 'stat' to show stats. 'ping' to ping.\n'pingip' to ping an ip address\n'ban' to ban an IP from connecting.\n'kick to kick the first connected player.\nType to talk.");
char message[2048];
// Loop for input
for(;;)
{
// This sleep keeps RakNet responsive
RakSleep(30);
if (_kbhit())
{
// Notice what is not here: something to keep our network running. It's
// fine to block on gets or anything we want
// Because the network engine was painstakingly written using threads.
Gets(message,sizeof(message));
if (strcmp(message, "quit")==0)
{
puts("Quitting.");
break;
}
if (strcmp(message, "stat")==0)
{
rss=server->GetStatistics(server->GetSystemAddressFromIndex(0));
StatisticsToString(rss, message, 2048, 2);
printf("%s", message);
printf("Ping %i\n", server->GetAveragePing(server->GetSystemAddressFromIndex(0)));
continue;
}
if (strcmp(message, "ping")==0)
{
server->Ping(clientID);
continue;
}
if (strcmp(message, "pingip")==0)
{
printf("Enter IP: ");
Gets(message,sizeof(message));
printf("Enter port: ");
Gets(portstring,sizeof(portstring));
if (portstring[0]==0)
strcpy_s(portstring, "1234");
const int intPort = atoi(portstring);
if ((intPort < 0) || (intPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified port %d is outside valid bounds [0, %u]", intPort, std::numeric_limits<unsigned short>::max());
continue;
}
server->Ping(message, static_cast<unsigned short>(intPort), false);
continue;
}
if (strcmp(message, "kick")==0)
{
server->CloseConnection(clientID, true, 0);
continue;
}
if (strcmp(message, "getconnectionlist")==0)
{
SLNet::SystemAddress systems[10];
unsigned short numConnections=10;
server->GetConnectionList((SLNet::SystemAddress*) &systems, &numConnections);
for (int i=0; i < numConnections; i++)
{
printf("%i. %s\n", i+1, systems[i].ToString(true));
}
continue;
}
if (strcmp(message, "ban")==0)
{
printf("Enter IP to ban. You can use * as a wildcard\n");
Gets(message,sizeof(message));
server->AddToBanList(message);
printf("IP %s added to ban list.\n", message);
continue;
}
// Message now holds what we want to broadcast
char message2[2048];
// Append Server: to the message so clients know that it ORIGINATED from the server
// All messages to all clients come from the server either directly or by being
// relayed from other clients
message2[0]=0;
const static char prefix[] = "Server: ";
strncpy_s(message2, prefix, sizeof(message2));
strncat_s(message2, message, sizeof(message2) - strlen(prefix) - 1);
// message2 is the data to send
// strlen(message2)+1 is to send the null-terminator
// HIGH_PRIORITY doesn't actually matter here because we don't use any other priority
// RELIABLE_ORDERED means make sure the message arrives in the right order
// We arbitrarily pick 0 for the ordering stream
// SLNet::UNASSIGNED_SYSTEM_ADDRESS means don't exclude anyone from the broadcast
// true means broadcast the message to everyone connected
server->Send(message2, (const int) strlen(message2)+1, HIGH_PRIORITY, RELIABLE_ORDERED, 0, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
}
// Get a packet from either the server or the client
for (p=server->Receive(); p; server->DeallocatePacket(p), p=server->Receive())
{
// We got a packet, get the identifier with our handy function
packetIdentifier = GetPacketIdentifier(p);
// Check if this is a network message packet
switch (packetIdentifier)
{
case ID_DISCONNECTION_NOTIFICATION:
// Connection lost normally
printf("ID_DISCONNECTION_NOTIFICATION from %s\n", p->systemAddress.ToString(true));;
break;
case ID_NEW_INCOMING_CONNECTION:
// Somebody connected. We have their IP now
printf("ID_NEW_INCOMING_CONNECTION from %s with GUID %s\n", p->systemAddress.ToString(true), p->guid.ToString());
clientID=p->systemAddress; // Record the player ID of the client
printf("Remote internal IDs:\n");
for (int index=0; index < MAXIMUM_NUMBER_OF_INTERNAL_IDS; index++)
{
SLNet::SystemAddress internalId = server->GetInternalID(p->systemAddress, index);
if (internalId!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("%i. %s\n", index+1, internalId.ToString(true));
}
}
break;
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
printf("ID_INCOMPATIBLE_PROTOCOL_VERSION\n");
break;
case ID_CONNECTED_PING:
case ID_UNCONNECTED_PING:
printf("Ping from %s\n", p->systemAddress.ToString(true));
break;
case ID_CONNECTION_LOST:
// Couldn't deliver a reliable packet - i.e. the other system was abnormally
// terminated
printf("ID_CONNECTION_LOST from %s\n", p->systemAddress.ToString(true));;
break;
default:
// The server knows the static data of all clients, so we can prefix the message
// With the name data
printf("%s\n", p->data);
// Relay the message. We prefix the name for other clients. This demonstrates
// That messages can be changed on the server before being broadcast
// Sending is the same as before
sprintf_s(message, "%s", p->data);
server->Send(message, (const int) strlen(message)+1, HIGH_PRIORITY, RELIABLE_ORDERED, 0, p->systemAddress, true);
break;
}
}
}
server->Shutdown(300);
// We're done with the network
SLNet::RakPeerInterface::DestroyInstance(server);
return 0;
}
// Copied from Multiplayer.cpp
// If the first byte is ID_TIMESTAMP, then we want the 5th byte
// Otherwise we want the 1st byte
unsigned char GetPacketIdentifier(SLNet::Packet *p)
{
if (p==0)
return 255;
if ((unsigned char)p->data[0] == ID_TIMESTAMP)
{
RakAssert(p->length > sizeof(SLNet::MessageID) + sizeof(SLNet::Time));
return (unsigned char) p->data[sizeof(SLNet::MessageID) + sizeof(SLNet::Time)];
}
else
return (unsigned char) p->data[0];
}

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Chat Example Server</ProjectName>
<ProjectGuid>{B66086C8-4EBC-42F0-8E8D-AA6D5005B94D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Chat Example Server.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Chat Example Server.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../../Source/include;./../../../DependentExtensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Chat Example Server.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<Private>true</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header">
<UniqueIdentifier>{345c028f-37eb-40ff-af78-b314cc0745ed}</UniqueIdentifier>
</Filter>
<Filter Include="Source">
<UniqueIdentifier>{5762d870-a022-4774-b049-94a173e6bbc1}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Chat Example Server.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples")

View File

@ -0,0 +1,260 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CloudClient</ProjectName>
<ProjectGuid>{0CDCA369-127B-4983-9192-39D8368BD71F}</ProjectGuid>
<RootNamespace>CloudClient</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CloudClientSample.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CloudClientSample.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,256 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/CloudClient.h"
#include "slikenet/peerinterface.h"
#include "slikenet/sleep.h"
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
void PrintHelp(void)
{
printf("CloudClient as a directory server.\n");
printf("Usage:\n");
printf("CloudClient.exe ServerAddress [Port]\n\n");
printf("Parameters:\n");
printf("ServerAddress - Any server in the cloud.\n");
printf("Port - Server listen port. Default is 60000\n");
printf("Example:\n");
printf("CloudServer.exe test.dnsalias.net 60000\n\n");
}
#define CLOUD_CLIENT_PRIMARY_KEY "CC_Sample_PK"
void UploadInstanceToCloud(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
void GetClientSubscription(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
void GetServers(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid);
int main(int argc, char **argv)
{
const char *DEFAULT_SERVER_ADDRESS="test.dnsalias.net";
const unsigned short DEFAULT_SERVER_PORT=60000;
const char *serverAddress;
unsigned short serverPort;
#ifndef _DEBUG
// Only use DEFAULT_SERVER_ADDRESS for debugging
if (argc<2)
{
PrintHelp();
return false;
}
#endif
if (argc<2) serverAddress=DEFAULT_SERVER_ADDRESS;
else serverAddress=argv[1];
if (argc<3) serverPort=DEFAULT_SERVER_PORT;
else {
const int intServerPort = atoi(argv[2]);
if ((intServerPort < 0) || (intServerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified server port %d is outside valid bounds [0, %u]", intServerPort, std::numeric_limits<unsigned short>::max());
return 1;
}
serverPort = static_cast<unsigned short>(intServerPort);
}
// ---- RAKPEER -----
SLNet::RakPeerInterface *rakPeer;
rakPeer= SLNet::RakPeerInterface::GetInstance();
static const unsigned short clientLocalPort=0;
SLNet::SocketDescriptor sd(clientLocalPort,0); // Change this if you want
SLNet::StartupResult sr = rakPeer->Startup(1,&sd,1); // Change this if you want
rakPeer->SetMaximumIncomingConnections(0); // Change this if you want
if (sr!= SLNet::RAKNET_STARTED)
{
printf("Startup failed. Reason=%i\n", (int) sr);
return 1;
}
SLNet::CloudClient cloudClient;
rakPeer->AttachPlugin(&cloudClient);
SLNet::ConnectionAttemptResult car = rakPeer->Connect(serverAddress, serverPort, 0, 0);
if (car== SLNet::CANNOT_RESOLVE_DOMAIN_NAME)
{
printf("Cannot resolve domain name\n");
return 1;
}
printf("Connecting to %s...\n", serverAddress);
bool didRebalance=false; // So we only reconnect to a lower load server once, for load balancing
SLNet::Packet *packet;
for(;;)
{
for (packet=rakPeer->Receive(); packet; rakPeer->DeallocatePacket(packet), packet=rakPeer->Receive())
{
switch (packet->data[0])
{
case ID_CONNECTION_LOST:
printf("Lost connection to server.\n");
return 1;
case ID_CONNECTION_ATTEMPT_FAILED:
printf("Failed to connect to server at %s.\n", packet->systemAddress.ToString(true));
return 1;
case ID_REMOTE_SYSTEM_REQUIRES_PUBLIC_KEY:
case ID_OUR_SYSTEM_REQUIRES_SECURITY:
case ID_PUBLIC_KEY_MISMATCH:
case ID_INVALID_PASSWORD:
case ID_CONNECTION_BANNED:
// You won't see these unless you modified CloudServer
printf("Server rejected the connection.\n");
return 1;
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
printf("Server is running an incompatible RakNet version.\n");
return 1;
case ID_NO_FREE_INCOMING_CONNECTIONS:
printf("Server has no free connections\n");
return 1;
case ID_IP_RECENTLY_CONNECTED:
printf("Recently connected. Retrying.");
rakPeer->Connect(serverAddress, serverPort, 0, 0);
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
printf("Connected to server.\n");
UploadInstanceToCloud(&cloudClient, packet->guid);
GetClientSubscription(&cloudClient, packet->guid);
GetServers(&cloudClient, packet->guid);
break;
case ID_CLOUD_GET_RESPONSE:
{
SLNet::CloudQueryResult cloudQueryResult;
cloudClient.OnGetReponse(&cloudQueryResult, packet);
unsigned int rowIndex;
const bool wasCallToGetServers=cloudQueryResult.cloudQuery.keys[0].primaryKey=="CloudConnCount";
printf("\n");
if (wasCallToGetServers)
printf("Downloaded server list. %i servers.\n", cloudQueryResult.rowsReturned.Size());
else
printf("Downloaded client list. %i clients.\n", cloudQueryResult.rowsReturned.Size());
unsigned short connectionsOnOurServer=65535;
unsigned short lowestConnectionsServer=65535;
SLNet::SystemAddress lowestConnectionAddress;
for (rowIndex=0; rowIndex < cloudQueryResult.rowsReturned.Size(); rowIndex++)
{
SLNet::CloudQueryRow *row = cloudQueryResult.rowsReturned[rowIndex];
if (wasCallToGetServers)
{
unsigned short connCount;
SLNet::BitStream bsIn(row->data, row->length, false);
bsIn.Read(connCount);
printf("%i. Server found at %s with %i connections\n", rowIndex+1, row->serverSystemAddress.ToString(true), connCount);
unsigned short connectionsExcludingOurselves;
if (row->serverGUID==packet->guid)
connectionsExcludingOurselves=connCount-1;
else
connectionsExcludingOurselves=connCount;
// Find the lowest load server (optional)
if (packet->guid==row->serverGUID)
{
connectionsOnOurServer=connectionsExcludingOurselves;
}
else if (connectionsExcludingOurselves < lowestConnectionsServer)
{
lowestConnectionsServer=connectionsExcludingOurselves;
lowestConnectionAddress=row->serverSystemAddress;
}
}
else
{
printf("%i. Client found at %s", rowIndex+1, row->clientSystemAddress.ToString(true));
if (row->clientGUID==rakPeer->GetMyGUID())
printf(" (Ourselves)");
SLNet::BitStream bsIn(row->data, row->length, false);
SLNet::RakString clientData;
bsIn.Read(clientData);
printf(" Data: %s", clientData.C_String());
printf("\n");
}
}
// Do load balancing by reconnecting to lowest load server (optional)
if (didRebalance==false && wasCallToGetServers && cloudQueryResult.rowsReturned.Size()>0 && connectionsOnOurServer>lowestConnectionsServer)
{
printf("Reconnecting to lower load server %s\n", lowestConnectionAddress.ToString(false));
rakPeer->CloseConnection(packet->guid, true);
// Wait for the thread to close, otherwise will immediately get back ID_CONNECTION_ATTEMPT_FAILED because no free outgoing connection slots
// Alternatively, just call Startup() with 2 slots instead of 1
RakSleep(500);
rakPeer->Connect(lowestConnectionAddress.ToString(false), lowestConnectionAddress.GetPort(), 0, 0);
didRebalance=true;
}
cloudClient.DeallocateWithDefaultAllocator(&cloudQueryResult);
}
break;
case ID_CLOUD_SUBSCRIPTION_NOTIFICATION:
{
bool wasUpdated;
SLNet::CloudQueryRow cloudQueryRow;
cloudClient.OnSubscriptionNotification(&wasUpdated, &cloudQueryRow, packet, 0 );
if (wasUpdated)
printf("New client at %s\n", cloudQueryRow.clientSystemAddress.ToString(true));
else
printf("Lost client at %s\n", cloudQueryRow.clientSystemAddress.ToString(true));
cloudClient.DeallocateWithDefaultAllocator(&cloudQueryRow);
}
break;
}
}
// Any additional client processing can go here
RakSleep(30);
}
// #med - add proper termination handling (then reenable the following code)
/*SLNet::RakPeerInterface::DestroyInstance(rakPeer);
return 0;*/
}
void UploadInstanceToCloud(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudKey cloudKey(CLOUD_CLIENT_PRIMARY_KEY,0);
SLNet::BitStream bs;
bs.Write("Hello World"); // This could be anything such as player list, game name, etc.
cloudClient->Post(&cloudKey, bs.GetData(), bs.GetNumberOfBytesUsed(), serverGuid);
}
void GetClientSubscription(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudQuery cloudQuery;
cloudQuery.keys.Push(SLNet::CloudKey(CLOUD_CLIENT_PRIMARY_KEY,0),_FILE_AND_LINE_);
cloudQuery.subscribeToResults=true; // Causes ID_CLOUD_SUBSCRIPTION_NOTIFICATION
cloudClient->Get(&cloudQuery, serverGuid);
}
void GetServers(SLNet::CloudClient *cloudClient, SLNet::RakNetGUID serverGuid)
{
SLNet::CloudQuery cloudQuery;
cloudQuery.keys.Push(SLNet::CloudKey("CloudConnCount",0),_FILE_AND_LINE_); // CloudConnCount is defined at the top of CloudServerHelper.cpp
cloudQuery.subscribeToResults=false;
cloudClient->Get(&cloudQuery, serverGuid);
}

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples")

View File

@ -0,0 +1,264 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CloudServer</ProjectName>
<ProjectGuid>{AC5D8934-E93C-492E-BEF4-16EEA03E0AC3}</ProjectGuid>
<RootNamespace>CloudServer</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CloudServerHelper.cpp" />
<ClCompile Include="CloudServerSample.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CloudServerHelper.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CloudServerHelper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CloudServerSample.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CloudServerHelper.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,631 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-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.
*/
#include "CloudServerHelper.h"
#include "slikenet/sleep.h"
#include "slikenet/Gets.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/FullyConnectedMesh2.h"
#include "slikenet/TwoWayAuthentication.h"
#include "slikenet/CloudClient.h"
#include "slikenet/DynDNS.h"
#include "slikenet/SocketLayer.h"
#include "slikenet/peerinterface.h"
#include "slikenet/ConnectionGraph2.h"
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
using namespace SLNet;
#define CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY "CloudConnCount"
bool CloudServerHelperFilter::OnPostRequest(RakNetGUID clientGuid, SystemAddress clientAddress, CloudKey key, uint32_t dataLength, const char *data)
{
// unused parameters
(void)clientAddress;
(void)dataLength;
(void)data;
if (clientGuid!=serverGuid)
{
if (key.primaryKey==CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY)
return false;
}
return true;
}
bool CloudServerHelperFilter::OnReleaseRequest(RakNetGUID clientGuid, SystemAddress clientAddress, DataStructures::List<CloudKey> &cloudKeys)
{
// unused parameters
(void)clientGuid;
(void)clientAddress;
(void)cloudKeys;
return true;
}
bool CloudServerHelperFilter::OnGetRequest(RakNetGUID clientGuid, SystemAddress clientAddress, CloudQuery &query, DataStructures::List<RakNetGUID> &specificSystems)
{
// unused parameters
(void)clientGuid;
(void)clientAddress;
(void)query;
(void)specificSystems;
return true;
}
bool CloudServerHelperFilter::OnUnsubscribeRequest(RakNetGUID clientGuid, SystemAddress clientAddress, DataStructures::List<CloudKey> &cloudKeys, DataStructures::List<RakNetGUID> &specificSystems)
{
// unused parameters
(void)clientGuid;
(void)clientAddress;
(void)cloudKeys;
(void)specificSystems;
return true;
}
bool CloudServerHelper::ParseCommandLineParameters(int argc, char **argv)
{
char *DEFAULT_SERVER_TO_SERVER_PASSWORD="qwerty1234";
const unsigned short DEFAULT_SERVER_PORT=60000;
const unsigned short DEFAULT_ALLOWED_INCOMING_CONNECTIONS=1024;
const unsigned short DEFAULT_ALLOWED_OUTGOING_CONNECTIONS=64;
if (argc<2) serverToServerPassword=DEFAULT_SERVER_TO_SERVER_PASSWORD;
else serverToServerPassword=argv[1];
if (argc<3) rakPeerPort=DEFAULT_SERVER_PORT;
else {
const int intPeerPort = atoi(argv[2]);
if ((intPeerPort < 0) || (intPeerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified peer port %d is outside valid bounds [0, %u]", intPeerPort, std::numeric_limits<unsigned short>::max());
return false;
}
rakPeerPort = static_cast<unsigned short>(rakPeerPort);
}
if (argc<4) allowedIncomingConnections=DEFAULT_ALLOWED_INCOMING_CONNECTIONS;
else {
const int intConnections = atoi(argv[3]);
if ((intConnections < 0) || (intConnections > std::numeric_limits<unsigned short>::max())) {
printf("Specified allowed incoming connections %d is outside valid bounds [0, %u]", intConnections, std::numeric_limits<unsigned short>::max());
return false;
}
allowedIncomingConnections = static_cast<unsigned short>(intConnections);
}
if (argc<5) allowedOutgoingConnections=DEFAULT_ALLOWED_OUTGOING_CONNECTIONS;
else {
const int intConnections = atoi(argv[4]);
if ((intConnections < 0) || (intConnections > std::numeric_limits<unsigned short>::max())) {
printf("Specified allowed outgoing connections %d is outside valid bounds [0, %u]", intConnections, std::numeric_limits<unsigned short>::max());
return false;
}
allowedOutgoingConnections = static_cast<unsigned short>(intConnections);
}
return true;
}
bool CloudServerHelper_DynDns::ParseCommandLineParameters(int argc, char **argv)
{
const unsigned short DEFAULT_SERVER_PORT=60000;
const unsigned short DEFAULT_ALLOWED_INCOMING_CONNECTIONS=1024;
const unsigned short DEFAULT_ALLOWED_OUTGOING_CONNECTIONS=64;
#ifdef _DEBUG
char *DEFAULT_DNS_HOST = "test.dnsalias.net";
char *DEFAULT_USERNAME_AND_PASSWORD = "test:test";
char *DEFAULT_SERVER_TO_SERVER_PASSWORD = "qwerty1234";
#endif
#ifndef _DEBUG
// Only allow insecure defaults for debugging
if (argc<4)
{
PrintHelp();
return false;
}
dnsHost=argv[1];
dynDNSUsernameAndPassword=argv[2];
serverToServerPassword=argv[3];
#else
if (argc<2) dnsHost=DEFAULT_DNS_HOST;
else dnsHost=argv[1];
if (argc<3) dynDNSUsernameAndPassword=DEFAULT_USERNAME_AND_PASSWORD;
else dynDNSUsernameAndPassword=argv[2];
if (argc<4) serverToServerPassword=DEFAULT_SERVER_TO_SERVER_PASSWORD;
else serverToServerPassword=argv[3];
#endif
if (argc<5) rakPeerPort=DEFAULT_SERVER_PORT;
else {
const int intPeerPort = atoi(argv[4]);
if ((intPeerPort < 0) || (intPeerPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified peer port %d is outside valid bounds [0, %u]", intPeerPort, std::numeric_limits<unsigned short>::max());
return false;
}
rakPeerPort = static_cast<unsigned short>(rakPeerPort);
}
if (argc<6) allowedIncomingConnections=DEFAULT_ALLOWED_INCOMING_CONNECTIONS;
else {
const int intConnections = atoi(argv[5]);
if ((intConnections < 0) || (intConnections > std::numeric_limits<unsigned short>::max())) {
printf("Specified allowed incoming connections %d is outside valid bounds [0, %u]", intConnections, std::numeric_limits<unsigned short>::max());
return false;
}
allowedIncomingConnections = static_cast<unsigned short>(intConnections);
}
if (argc<7) allowedOutgoingConnections=DEFAULT_ALLOWED_OUTGOING_CONNECTIONS;
else {
const int intConnections = atoi(argv[6]);
if ((intConnections < 0) || (intConnections > std::numeric_limits<unsigned short>::max())) {
printf("Specified allowed outgoing connections %d is outside valid bounds [0, %u]", intConnections, std::numeric_limits<unsigned short>::max());
return false;
}
allowedOutgoingConnections = static_cast<unsigned short>(intConnections);
}
return true;
}
void CloudServerHelper::PrintHelp(void)
{
printf("Distributed authenticated CloudServer using DNS based host migration.\n");
printf("Query running servers with CloudClient::Get() on key CloudServerList,0\n\n");
printf("Query load with key CloudConnCount,0. Read row data as unsigned short.\n\n");
printf("Usage:\n");
printf("CloudServer.exe DNSHost Username:Password S2SPWD [Port] [ConnIn] [ConnOut]\n\n");
printf("Parameters:\n");
printf("DNSHost - Free DNS hostname from http://www.dyndns.com/\n");
printf("Username:Password - Account settings from http://www.dyndns.com/\n");
printf("S2SPWD - Server to server cloud password. Anything random.\n");
printf("Port - RakNet listen port. Default is 60000\n");
printf("ConnIn - Max incoming connections for clients. Default is 1024\n");
printf("ConnIn - Max outgoing connections, used for server to server. Default 64\n\n");
printf("Example:\n");
printf("CloudServer.exe test.dnsalias.net test:test qwerty1234 60000 1024 64\n\n");
}
bool CloudServerHelper::StartRakPeer(SLNet::RakPeerInterface *rakPeer)
{
SLNet::SocketDescriptor sd(SLNet::CloudServerHelper::rakPeerPort,0);
SLNet::StartupResult sr = rakPeer->Startup(SLNet::CloudServerHelper::allowedIncomingConnections+ SLNet::CloudServerHelper::allowedOutgoingConnections,&sd,1);
if (sr!= SLNet::RAKNET_STARTED)
{
printf("Startup failed. Reason=%i\n", (int) sr);
return false;
}
rakPeer->SetMaximumIncomingConnections(SLNet::CloudServerHelper::allowedIncomingConnections);
//rakPeer->SetTimeoutTime(60000,UNASSIGNED_SYSTEM_ADDRESS);
return true;
}
Packet *CloudServerHelper::ConnectToRakPeer(const char *host, unsigned short port, RakPeerInterface *rakPeer)
{
printf("RakPeer: Connecting to %s\n", host);
ConnectionAttemptResult car;
car = rakPeer->Connect(host, port, 0, 0);
if (car!=CONNECTION_ATTEMPT_STARTED)
{
printf("Connect() call failed\n");
if (car==CANNOT_RESOLVE_DOMAIN_NAME) printf("Cannot resolve domain name\n");
return 0;
}
Packet *packet;
for(;;)
{
for (packet=rakPeer->Receive(); packet; rakPeer->DeallocatePacket(packet), packet=rakPeer->Receive())
{
switch (packet->data[0])
{
case ID_CONNECTION_ATTEMPT_FAILED:
return packet;
case ID_REMOTE_SYSTEM_REQUIRES_PUBLIC_KEY:
case ID_OUR_SYSTEM_REQUIRES_SECURITY:
case ID_PUBLIC_KEY_MISMATCH:
case ID_CONNECTION_BANNED:
case ID_INVALID_PASSWORD:
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
return packet;
case ID_NO_FREE_INCOMING_CONNECTIONS:
case ID_IP_RECENTLY_CONNECTED:
printf("Remote system full. Retrying...");
car = rakPeer->Connect(host, port, 0, 0);
if (car!=CONNECTION_ATTEMPT_STARTED)
{
printf("Connect() call failed\n");
if (car==CANNOT_RESOLVE_DOMAIN_NAME) printf("Cannot resolve domain name\n");
return 0;
}
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
if (packet->guid==rakPeer->GetMyGUID())
{
// Just connected to myself! Host must be pointing to our own IP address.
rakPeer->CloseConnection(packet->guid,false);
RakSleep(30); // Let the thread clear out
packet->data[0]=ID_ALREADY_CONNECTED;
return packet;
}
case ID_ALREADY_CONNECTED:
return packet; // Not initial host
}
}
RakSleep(30);
}
}
bool CloudServerHelper_DynDns::SetHostDNSToThisSystemBlocking(void)
{
dynDNS->UpdateHostIPAsynch(
dnsHost,
0,
dynDNSUsernameAndPassword);
// Wait for the DNS update to complete
do
{
dynDNS->Update();
if (dynDNS->IsCompleted())
{
printf("%s\n", dynDNS->GetCompletedDescription());
break;
}
RakSleep(30);
} while (!dynDNS->IsCompleted());
return dynDNS->WasResultSuccessful();
}
MessageID CloudServerHelper::AuthenticateRemoteServerBlocking(RakPeerInterface *rakPeer, TwoWayAuthentication *twoWayAuthentication, RakNetGUID remoteSystem)
{
twoWayAuthentication->Challenge("CloudServerHelperS2SPassword", remoteSystem);
MessageID messageId;
Packet *packet;
for(;;)
{
for (packet=rakPeer->Receive(); packet; rakPeer->DeallocatePacket(packet), packet=rakPeer->Receive())
{
switch (packet->data[0])
{
case ID_CONNECTION_LOST:
case ID_DISCONNECTION_NOTIFICATION:
if (packet->guid==remoteSystem)
{
messageId=packet->data[0];
rakPeer->DeallocatePacket(packet);
return messageId;
}
break;
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS:
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_TIMEOUT:
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_FAILURE:
{
messageId=packet->data[0];
rakPeer->DeallocatePacket(packet);
return messageId;
}
break;
}
}
RakSleep(30);
}
}
void CloudServerHelper::SetupPlugins(
SLNet::CloudServer *cloudServer,
SLNet::CloudServerHelperFilter *sampleFilter,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *newServerToServerPassword
)
{
// unused parameters
(void)cloudClient;
cloudServer->AddQueryFilter(sampleFilter);
// Connect to all systems told about via ConnectionGraph2::AddParticpant(). We are only told about servers that have already been authenticated
fullyConnectedMesh2->SetConnectOnNewRemoteConnection(true, "");
// Do not add to the host trracking system all connections, only those designated as servers
fullyConnectedMesh2->SetAutoparticipateConnections(false);
// Shared password
twoWayAuthentication->AddPassword("CloudServerHelperS2SPassword", newServerToServerPassword);
// Do not add systems to the graph unless first validated as a server through the TwoWayAuthentication plugin
connectionGraph2->SetAutoProcessNewConnections(false);
}
void CloudServerHelper::OnPacket(Packet *packet, RakPeerInterface *rakPeer, CloudClient *cloudClient, SLNet::CloudServer *cloudServer, SLNet::FullyConnectedMesh2 *fullyConnectedMesh2, TwoWayAuthentication *twoWayAuthentication, ConnectionGraph2 *connectionGraph2)
{
switch (packet->data[0])
{
case ID_FCM2_NEW_HOST:
SLNet::CloudServerHelper::OnFCMNewHost(packet, rakPeer);
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
twoWayAuthentication->Challenge("CloudServerHelperS2SPassword", packet->guid);
// Fallthrough
case ID_NEW_INCOMING_CONNECTION:
printf("Got connection to %s\n", packet->systemAddress.ToString(true));
SLNet::CloudServerHelper::OnConnectionCountChange(rakPeer, cloudClient);
break;
case ID_CONNECTION_LOST:
// printf("ID_CONNECTION_LOST (UDP) from %s\n", packet->systemAddress.ToString(true));
SLNet::CloudServerHelper::OnConnectionCountChange(rakPeer, cloudClient);
break;
case ID_DISCONNECTION_NOTIFICATION:
// printf("ID_DISCONNECTION_NOTIFICATION (UDP) from %s\n", packet->systemAddress.ToString(true));
SLNet::CloudServerHelper::OnConnectionCountChange(rakPeer, cloudClient);
break;
case ID_TWO_WAY_AUTHENTICATION_INCOMING_CHALLENGE_SUCCESS:
printf("New server connected to us from %s\n", packet->systemAddress.ToString(true));
// Fallthrough
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS:
if (packet->data[0]==ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS)
printf("We connected to server %s\n", packet->systemAddress.ToString(true));
cloudServer->AddServer(packet->guid);
fullyConnectedMesh2->AddParticipant(packet->guid);
connectionGraph2->AddParticipant(packet->systemAddress, packet->guid);
break;
case ID_TWO_WAY_AUTHENTICATION_INCOMING_CHALLENGE_FAILURE:
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_FAILURE:
case ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_TIMEOUT:
rakPeer->CloseConnection(packet->guid,false);
break;
}
}
bool CloudServerHelper::Update(void)
{
return true;
}
CloudServerHelper_DynDns::CloudServerHelper_DynDns(DynDNS *_dynDns)
{
dynDNS = _dynDns;
}
bool CloudServerHelper_DynDns::Update(void)
{
// Keep DNS updated if needed
if (dynDNS->IsRunning())
{
dynDNS->Update();
if (dynDNS->IsCompleted())
{
printf("%s.\n", dynDNS->GetCompletedDescription());
if (dynDNS->WasResultSuccessful()==false)
return false;
printf("Note: The DNS cache update takes about 60 seconds.\n");
}
}
return true;
}
void CloudServerHelper::OnFCMNewHost(Packet *packet, RakPeerInterface *rakPeer)
{
// unused parameters
(void)packet;
(void)rakPeer;
}
void CloudServerHelper_DynDns::OnFCMNewHost(Packet *packet, RakPeerInterface *rakPeer)
{
RakAssert(packet->data[0]==ID_FCM2_NEW_HOST);
SLNet::BitStream bsIn(packet->data, packet->length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
RakNetGUID oldHost;
bsIn.Read(oldHost);
RakNetGUID newHost = packet->guid;
if (newHost==rakPeer->GetMyGUID() && oldHost!=newHost)
{
printf("Assuming host. Updating DNS\n");
// Change dynDNS to point to us
dynDNS->UpdateHostIPAsynch(
dnsHost,
0,
dynDNSUsernameAndPassword);
}
}
void CloudServerHelper::OnConnectionCountChange(RakPeerInterface *rakPeer, CloudClient *cloudClient)
{
SLNet::BitStream bs;
CloudKey cloudKey(CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY,0);
unsigned short numberOfSystems;
rakPeer->GetConnectionList(0, &numberOfSystems);
bs.Write(numberOfSystems);
cloudClient->Post(&cloudKey, bs.GetData(), bs.GetNumberOfBytesUsed(), rakPeer->GetMyGUID());
}
int CloudServerHelper_DynDns::OnJoinCloudResult(
Packet *packet,
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain,
char myPublicIP[32]
)
{
if (packet->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
{
printf("Failed connection. Changing DNS to point to this system.\n");
if (SetHostDNSToThisSystemBlocking()==false)
return 1;
// dynDNS gets our public IP when it succeeds
strcpy_s( myPublicIP, 32, dynDNS->GetMyPublicIP());
}
return CloudServerHelper::OnJoinCloudResult(packet, rakPeer, cloudServer, cloudClient, fullyConnectedMesh2, twoWayAuthentication, connectionGraph2, rakPeerIpOrDomain, myPublicIP);
}
int CloudServerHelper::OnJoinCloudResult(
Packet *packet,
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain,
char myPublicIP[32]
)
{
SLNet::MessageID result;
SystemAddress packetAddress;
RakNetGUID packetGuid;
result = packet->data[0];
packetAddress = packet->systemAddress;
packetGuid = packet->guid;
if (result==ID_CONNECTION_REQUEST_ACCEPTED)
{
printf("Connected to host %s.\n", rakPeerIpOrDomain);
// We connected through a public IP.
// Our external IP should also be public
// rakPeer->GetExternalID(packetAddress).ToString(false, myPublicIP);
// Log in to the remote server using two way authentication
result = SLNet::CloudServerHelper::AuthenticateRemoteServerBlocking(rakPeer, twoWayAuthentication, packetGuid);
if (result==ID_CONNECTION_LOST || result==ID_DISCONNECTION_NOTIFICATION)
{
printf("Connection lost while authenticating.\n");
printf("Waiting 60 seconds then restarting.\n");
RakSleep(60000);
return 2;
}
else if (result==ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_TIMEOUT)
{
// Other system is not running plugin? Fail
printf("Remote server did not respond to challenge.\n");
return 1;
}
else if (result==ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_FAILURE)
{
printf("Failed remote server challenge.\n");
return 1;
}
RakAssert(result==ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS);
// Add this system as a server, and to FullyConnectedMesh2 as a participant
cloudServer->AddServer(packetGuid);
fullyConnectedMesh2->AddParticipant(packetGuid);
connectionGraph2->AddParticipant(packetAddress, packetGuid);
}
else if (result==ID_ALREADY_CONNECTED)
{
printf("Connected to self. DNS entry already points to this server.\n");
/*
if (SetHostDNSToThisSystemBlocking()==false)
return 1;
// dynDNS gets our public IP when it succeeds
strcpy_s( myPublicIP, dynDNS->GetMyPublicIP());
*/
// dnsHost is always public, so if I can connect through it that's my public IP
RakNetSocket2::DomainNameToIP( rakPeerIpOrDomain, myPublicIP );
}
else if (result==ID_CONNECTION_ATTEMPT_FAILED)
{
}
else
{
// Another server is running but we cannot connect to them
printf("Critical failure\n");
printf("Reason: ");
switch (result)
{
case ID_REMOTE_SYSTEM_REQUIRES_PUBLIC_KEY:
case ID_OUR_SYSTEM_REQUIRES_SECURITY:
case ID_PUBLIC_KEY_MISMATCH:
printf("Other system is running security code.\n");
break;
case ID_CONNECTION_BANNED:
printf("Banned from the other system.\n");
break;
case ID_INVALID_PASSWORD:
printf("Other system has a password.\n");
break;
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
printf("Different major RakNet version.\n");
break;
default:
printf("N/A\n");
break;
}
return 1;
}
// Force the external server address for queries. Otherwise it would report 127.0.0.1 since the client is on localhost
SystemAddress forceAddress;
forceAddress.FromStringExplicitPort(myPublicIP, SLNet::CloudServerHelper::rakPeerPort);
cloudServer->ForceExternalSystemAddress(forceAddress);
if (result==ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS)
{
OnConnectionCountChange(rakPeer, cloudClient);
}
else
{
SLNet::BitStream bs;
CloudKey cloudKey(CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY,0);
bs.WriteCasted<unsigned short>(0);
cloudClient->Post(&cloudKey, bs.GetData(), bs.GetNumberOfBytesUsed(), rakPeer->GetMyGUID());
}
return 0;
}
int CloudServerHelper::JoinCloud(
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain
)
{
Packet *packet;
char myPublicIP[32];
// Reset plugins
cloudServer->Clear();
fullyConnectedMesh2->Clear();
// ---- CONNECT TO EXISTING SERVER ----
packet = SLNet::CloudServerHelper::ConnectToRakPeer(rakPeerIpOrDomain, SLNet::CloudServerHelper::rakPeerPort, rakPeer);
if (packet==0)
return 1;
int res = OnJoinCloudResult(packet, rakPeer, cloudServer, cloudClient, fullyConnectedMesh2, twoWayAuthentication, connectionGraph2, rakPeerIpOrDomain, myPublicIP);
rakPeer->DeallocatePacket(packet);
return res;
}

View File

@ -0,0 +1,133 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, 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.
*/
#ifndef __CLOUD_SERVER_HELPER_H
#define __CLOUD_SERVER_HELPER_H
#include "slikenet/CloudServer.h"
namespace SLNet
{
class DynDNS;
class CloudClient;
class TwoWayAuthentication;
class FullyConnectedMesh2;
class ConnectionGraph2;
class CloudServerHelperFilter : public CloudServerQueryFilter
{
public:
virtual bool OnPostRequest(RakNetGUID clientGuid, SystemAddress clientAddress, CloudKey key, uint32_t dataLength, const char *data);
virtual bool OnReleaseRequest(RakNetGUID clientGuid, SystemAddress clientAddress, DataStructures::List<CloudKey> &cloudKeys);
virtual bool OnGetRequest(RakNetGUID clientGuid, SystemAddress clientAddress, CloudQuery &query, DataStructures::List<RakNetGUID> &specificSystems);
virtual bool OnUnsubscribeRequest(RakNetGUID clientGuid, SystemAddress clientAddress, DataStructures::List<CloudKey> &cloudKeys, DataStructures::List<RakNetGUID> &specificSystems);
RakNetGUID serverGuid;
};
// To use this class without DynDNS, you only need the CloudServer class. and CloudServerHelperFilter
// The only function you need is CloudServerHelper::OnPacket() for CloudServerHelper::OnConnectionCountChange
// For setup, call cloudServer->AddQueryFilter(sampleFilter);
struct CloudServerHelper
{
char *serverToServerPassword;
unsigned short rakPeerPort;
// #med - consider changing to (unsigned?) int
unsigned short allowedIncomingConnections;
unsigned short allowedOutgoingConnections;
virtual void OnPacket(Packet *packet, RakPeerInterface *rakPeer, CloudClient *cloudClient, SLNet::CloudServer *cloudServer, SLNet::FullyConnectedMesh2 *fullyConnectedMesh2, TwoWayAuthentication *twoWayAuthentication, ConnectionGraph2 *connectionGraph2);
virtual bool Update(void);
virtual bool ParseCommandLineParameters(int argc, char **argv);
virtual void PrintHelp(void);
bool StartRakPeer(SLNet::RakPeerInterface *rakPeer);
Packet *ConnectToRakPeer(const char *host, unsigned short port, RakPeerInterface *rakPeer);
MessageID AuthenticateRemoteServerBlocking(RakPeerInterface *rakPeer, TwoWayAuthentication *twoWayAuthentication, RakNetGUID remoteSystem);
void SetupPlugins(
SLNet::CloudServer *cloudServer,
SLNet::CloudServerHelperFilter *sampleFilter,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *newServerToServerPassword
);
int JoinCloud(
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain
);
// Call when the number of client connections change
// Usually internal
virtual void OnConnectionCountChange(RakPeerInterface *rakPeer, CloudClient *cloudClient);
protected:
// Call when you get ID_FCM2_NEW_HOST
virtual void OnFCMNewHost(Packet *packet, RakPeerInterface *rakPeer);
virtual int OnJoinCloudResult(
Packet *packet,
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain,
char myPublicIP[32]
);
};
struct CloudServerHelper_DynDns : public CloudServerHelper
{
public:
CloudServerHelper_DynDns(DynDNS *_dynDns);
// Returns false on DNS update failure
virtual bool Update(void);
virtual bool SetHostDNSToThisSystemBlocking(void);
virtual bool ParseCommandLineParameters(int argc, char **argv);
protected:
DynDNS *dynDNS;
char *dynDNSUsernameAndPassword;
char *dnsHost;
// Call when you get ID_FCM2_NEW_HOST
virtual void OnFCMNewHost(Packet *packet, RakPeerInterface *rakPeer);
virtual int OnJoinCloudResult(
Packet *packet,
SLNet::RakPeerInterface *rakPeer,
SLNet::CloudServer *cloudServer,
SLNet::CloudClient *cloudClient,
SLNet::FullyConnectedMesh2 *fullyConnectedMesh2,
SLNet::TwoWayAuthentication *twoWayAuthentication,
SLNet::ConnectionGraph2 *connectionGraph2,
const char *rakPeerIpOrDomain,
char myPublicIP[32]
);
};
} // namespace SLNet
#endif // __CLOUD_SERVER_HELPER_H

View File

@ -0,0 +1,94 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "CloudServerHelper.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/FullyConnectedMesh2.h"
#include "slikenet/TwoWayAuthentication.h"
#include "slikenet/CloudClient.h"
#include "slikenet/DynDNS.h"
#include "slikenet/peerinterface.h"
#include "slikenet/sleep.h"
#include "slikenet/ConnectionGraph2.h"
int main(int argc, char **argv)
{
// Used to update DNS
SLNet::DynDNS dynDNS;
SLNet::CloudServerHelper_DynDns cloudServerHelper(&dynDNS);
if (!cloudServerHelper.ParseCommandLineParameters(argc, argv))
return 1;
// ---- RAKPEER -----
SLNet::RakPeerInterface *rakPeer;
rakPeer= SLNet::RakPeerInterface::GetInstance();
// ---- PLUGINS -----
// Used to load balance clients, allow for client to client discovery
SLNet::CloudServer cloudServer;
// Used to update the local cloudServer
SLNet::CloudClient cloudClient;
// Used to determine the host of the server fully connected mesh, as well as to connect servers automatically
SLNet::FullyConnectedMesh2 fullyConnectedMesh2;
// Used for servers to verify each other - otherwise any system could pose as a server
// Could also be used to verify and restrict clients if paired with the MessageFilter plugin
SLNet::TwoWayAuthentication twoWayAuthentication;
// Used to tell servers about each other
SLNet::ConnectionGraph2 connectionGraph2;
rakPeer->AttachPlugin(&cloudServer);
rakPeer->AttachPlugin(&cloudClient);
rakPeer->AttachPlugin(&fullyConnectedMesh2);
rakPeer->AttachPlugin(&twoWayAuthentication);
rakPeer->AttachPlugin(&connectionGraph2);
if (!cloudServerHelper.StartRakPeer(rakPeer))
return 1;
SLNet::CloudServerHelperFilter sampleFilter; // Keeps clients from updating stuff to the server they are not supposed to
sampleFilter.serverGuid=rakPeer->GetMyGUID();
cloudServerHelper.SetupPlugins(&cloudServer, &sampleFilter, &cloudClient, &fullyConnectedMesh2, &twoWayAuthentication,&connectionGraph2, cloudServerHelper.serverToServerPassword);
int ret;
do
{
ret = cloudServerHelper.JoinCloud(rakPeer, &cloudServer, &cloudClient, &fullyConnectedMesh2, &twoWayAuthentication, &connectionGraph2, dynDNS.GetMyPublicIP());
} while (ret==2);
if (ret==1)
return 1;
// Should now be connect to the cloud, using authentication and FullyConnectedMesh2
printf("Running.\n");
SLNet::Packet *packet;
for(;;)
{
for (packet=rakPeer->Receive(); packet; rakPeer->DeallocatePacket(packet), packet=rakPeer->Receive())
{
cloudServerHelper.OnPacket(packet, rakPeer, &cloudClient, &cloudServer, &fullyConnectedMesh2, &twoWayAuthentication, &connectionGraph2);
}
// Update() returns false on DNS update failure
if (!cloudServerHelper.Update())
break;
// Any additional server processing beyond hosting the CloudServer can go here
RakSleep(30);
}
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
return 0;
}

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples")

View File

@ -0,0 +1,309 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/BitStream.h"
#include "slikenet/GetTime.h"
#include "slikenet/sleep.h"
#include "slikenet/Gets.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/CloudServer.h"
#include "slikenet/CloudClient.h"
#include "slikenet/Kbhit.h"
enum
{
CLIENT_1,
CLIENT_2,
SERVER_1,
SERVER_2,
RAKPEER_COUNT
};
enum
{
CLOUD_CLIENT_1,
CLOUD_CLIENT_2,
CLOUD_CLIENT_COUNT
};
enum
{
CLOUD_SERVER_1,
CLOUD_SERVER_2,
CLOUD_SERVER_COUNT
};
static const unsigned short STARTING_PORT=60000;
class MyCallback : public SLNet::CloudClientCallback
{
virtual void OnGet(SLNet::CloudQueryResult *result, bool *deallocateRowsAfterReturn)
{
// unused parameters
(void)deallocateRowsAfterReturn;
printf("On Download %i rows. IsSubscription=%i.\n", result->rowsReturned.Size(), result->subscribeToResults);
}
virtual void OnSubscriptionNotification(SLNet::CloudQueryRow *result, bool wasUpdated, bool *deallocateRowAfterReturn)
{
// unused parameters
(void)result;
(void)deallocateRowAfterReturn;
if (wasUpdated)
printf("OnSubscriptionNotification Updated\n");
else
printf("OnSubscriptionNotification Deleted\n");
}
};
class MyAllocator : public SLNet::CloudAllocator
{
};
int main(void)
{
printf("Tests the CloudServer and CloudClient plugins.\n");
printf("Difficulty: Intermediate\n\n");
MyCallback myCloudClientCallback;
MyAllocator myCloudClientAllocator;
SLNet::CloudServer cloudServer[CLOUD_SERVER_COUNT];
SLNet::CloudClient cloudClient[CLOUD_CLIENT_COUNT];
SLNet::RakPeerInterface *rakPeer[RAKPEER_COUNT];
for (unsigned short i=0; i < RAKPEER_COUNT; i++)
{
rakPeer[i]= SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor sd(STARTING_PORT+i,0);
rakPeer[i]->Startup(RAKPEER_COUNT,&sd,1);
}
for (unsigned short i=SERVER_1; i < RAKPEER_COUNT; i++)
{
rakPeer[i]->SetMaximumIncomingConnections(RAKPEER_COUNT);
}
for (unsigned short i=CLIENT_1, j=CLOUD_CLIENT_1; i < SERVER_1; i++, j++)
{
rakPeer[i]->AttachPlugin(&cloudClient[j]);
}
for (unsigned short i=SERVER_1, j=CLOUD_SERVER_1; i < RAKPEER_COUNT; i++, j++)
{
rakPeer[i]->AttachPlugin(&cloudServer[j]);
}
// Connect servers to each other
for (unsigned short i=SERVER_1; i < RAKPEER_COUNT-1; i++)
{
for (unsigned short j=i+1; j < RAKPEER_COUNT; j++)
{
rakPeer[j]->Connect("127.0.0.1", STARTING_PORT+i, 0, 0);
}
}
RakSleep(100);
// Tell servers about each other
for (unsigned int i=SERVER_1; i < RAKPEER_COUNT; i++)
{
unsigned short numberOfSystems;
rakPeer[i]->GetConnectionList(0, &numberOfSystems);
for (unsigned int j=0; j < numberOfSystems; j++)
{
cloudServer[i-SERVER_1].AddServer(rakPeer[i]->GetGUIDFromIndex(j));
}
}
// Connect clients to servers, assume equal counts
for (unsigned short i=CLIENT_1; i < SERVER_1; i++)
{
rakPeer[i]->Connect("127.0.0.1", STARTING_PORT+SERVER_1+i, 0, 0);
}
printf("'A' to upload data set 1 from client 1 to server 1.\n");
printf("'B' to upload data set 1 from client 2 to server 2.\n");
printf("'C' to upload data set 2 from client 1 to server 1.\n");
printf("'D' to download data sets 1 and 2 from client 1 from server 1.\n");
printf("'E' To release data set 1 and 2 from client 1 to server 1.\n");
printf("'F' To subscribe to data sets 1 and 2 from client 2 to server 2.\n");
printf("'G' To unsubscribe to data sets 1 and 2 from client 2 to server 2.\n");
printf("'H' To release data set 1 and 2 from client 2 to server 2.\n");
printf("'Y' to disconnect client 1.\n");
SLNet::Packet *packet;
for(;;)
{
int command;
if (_kbhit())
{
command=_getch();
if (command=='a' || command=='A')
{
printf("Uploading data set 1 from client 1\n");
SLNet::CloudKey dataKey1;
dataKey1.primaryKey="ApplicationName";
dataKey1.secondaryKey=1;
cloudClient[CLOUD_CLIENT_1].Post(&dataKey1, (const unsigned char*) "DS1C1S1", (uint32_t) strlen("DS1C1S1")+1, rakPeer[CLIENT_1]->GetGUIDFromIndex(0));
}
else if (command=='b' || command=='B')
{
printf("Uploading data set 1 from client 2\n");
SLNet::CloudKey dataKey1;
dataKey1.primaryKey="ApplicationName";
dataKey1.secondaryKey=1;
cloudClient[CLOUD_CLIENT_2].Post(&dataKey1, (const unsigned char*) "DS1C2S2", (uint32_t) strlen("DS1C2S2")+1, rakPeer[CLIENT_2]->GetGUIDFromIndex(0));
}
else if (command=='c' || command=='C')
{
printf("Uploading data set 2 from client 2\n");
SLNet::CloudKey dataKey1;
dataKey1.primaryKey="ApplicationName";
dataKey1.secondaryKey=2;
cloudClient[CLOUD_CLIENT_1].Post(&dataKey1, (const unsigned char*) "DS2C2S1", (uint32_t) strlen("DS2C2S1")+1, rakPeer[CLIENT_1]->GetGUIDFromIndex(0));
}
else if (command=='d' || command=='D')
{
printf("Downloading data sets 1 and 2 from client 1\n");
SLNet::CloudKey dataKey1;
dataKey1.primaryKey="ApplicationName";
dataKey1.secondaryKey=1;
SLNet::CloudQuery keyQuery;
keyQuery.keys.Push(SLNet::CloudKey("ApplicationName", 1), _FILE_AND_LINE_);
keyQuery.keys.Push(SLNet::CloudKey("ApplicationName", 2), _FILE_AND_LINE_);
keyQuery.maxRowsToReturn=0;
keyQuery.startingRowIndex=0;
keyQuery.subscribeToResults=false;
cloudClient[CLOUD_CLIENT_1].Get(&keyQuery, rakPeer[CLIENT_1]->GetGUIDFromIndex(0));
}
else if (command=='e' || command=='E')
{
printf("Releasing data sets 1 and 2 from client 1\n");
DataStructures::List<SLNet::CloudKey> keys;
keys.Push(SLNet::CloudKey("ApplicationName", 1), _FILE_AND_LINE_);
keys.Push(SLNet::CloudKey("ApplicationName", 2), _FILE_AND_LINE_);
cloudClient[CLOUD_CLIENT_1].Release(keys, rakPeer[CLIENT_1]->GetGUIDFromIndex(0));
}
else if (command=='f' || command=='F')
{
printf("Subscribing to data sets 1 and 2 from client 2 to server 2.\n");
SLNet::CloudQuery keyQuery;
keyQuery.keys.Push(SLNet::CloudKey("ApplicationName", 1), _FILE_AND_LINE_);
keyQuery.keys.Push(SLNet::CloudKey("ApplicationName", 2), _FILE_AND_LINE_);
keyQuery.maxRowsToReturn=0;
keyQuery.startingRowIndex=0;
keyQuery.subscribeToResults=true;
DataStructures::List<SLNet::RakNetGUID> specificSystems;
specificSystems.Push(rakPeer[CLIENT_1]->GetMyGUID(), _FILE_AND_LINE_);
cloudClient[CLOUD_CLIENT_2].Get(&keyQuery, specificSystems, rakPeer[CLIENT_2]->GetGUIDFromIndex(0));
}
else if (command=='g' || command=='G')
{
printf("Unsubscribing to data sets 1 and 2 from client 2 to server 2.\n");
DataStructures::List<SLNet::CloudKey> keys;
keys.Push(SLNet::CloudKey("ApplicationName", 1), _FILE_AND_LINE_);
keys.Push(SLNet::CloudKey("ApplicationName", 2), _FILE_AND_LINE_);
DataStructures::List<SLNet::RakNetGUID> specificSystems;
specificSystems.Push(rakPeer[CLIENT_1]->GetMyGUID(), _FILE_AND_LINE_);
cloudClient[CLOUD_CLIENT_2].Unsubscribe(keys, specificSystems, rakPeer[CLIENT_2]->GetGUIDFromIndex(0));
}
else if (command=='h' || command=='H')
{
printf("Releasing data sets 1 and 2 from client 2\n");
DataStructures::List<SLNet::CloudKey> keys;
keys.Push(SLNet::CloudKey("ApplicationName", 1), _FILE_AND_LINE_);
keys.Push(SLNet::CloudKey("ApplicationName", 2), _FILE_AND_LINE_);
cloudClient[CLOUD_CLIENT_2].Unsubscribe(keys, rakPeer[CLIENT_2]->GetGUIDFromIndex(0));
}
else if (command=='y' || command=='Y')
{
printf("Disconnecting client 1\n");
rakPeer[CLIENT_1]->Shutdown(100);
}
}
for (unsigned int rakPeerInstanceIndex=0; rakPeerInstanceIndex < RAKPEER_COUNT; rakPeerInstanceIndex++)
{
for (packet = rakPeer[rakPeerInstanceIndex]->Receive(); packet; rakPeer[rakPeerInstanceIndex]->DeallocatePacket(packet), packet = rakPeer[rakPeerInstanceIndex]->Receive())
{
printf("Instance %i: ", rakPeerInstanceIndex);
switch (packet->data[0])
{
case ID_DISCONNECTION_NOTIFICATION:
printf("ID_DISCONNECTION_NOTIFICATION\n");
break;
case ID_NEW_INCOMING_CONNECTION:
printf("ID_NEW_INCOMING_CONNECTION\n");
break;
case ID_ALREADY_CONNECTED:
printf("ID_ALREADY_CONNECTED\n");
break;
case ID_INCOMPATIBLE_PROTOCOL_VERSION:
printf("ID_INCOMPATIBLE_PROTOCOL_VERSION\n");
break;
case ID_REMOTE_DISCONNECTION_NOTIFICATION:
printf("ID_REMOTE_DISCONNECTION_NOTIFICATION\n");
break;
case ID_REMOTE_CONNECTION_LOST:
printf("ID_REMOTE_CONNECTION_LOST\n");
break;
case ID_REMOTE_NEW_INCOMING_CONNECTION:
printf("ID_REMOTE_NEW_INCOMING_CONNECTION\n");
break;
case ID_CONNECTION_BANNED:
printf("We are banned from this server.\n");
break;
case ID_CONNECTION_ATTEMPT_FAILED:
printf("Connection attempt failed\n");
break;
case ID_NO_FREE_INCOMING_CONNECTIONS:
printf("ID_NO_FREE_INCOMING_CONNECTIONS\n");
break;
case ID_INVALID_PASSWORD:
printf("ID_INVALID_PASSWORD\n");
break;
case ID_CONNECTION_LOST:
printf("ID_CONNECTION_LOST\n");
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
break;
case ID_CLOUD_GET_RESPONSE:
cloudClient[rakPeerInstanceIndex].OnGetReponse(packet, &myCloudClientCallback, &myCloudClientAllocator);
break;
case ID_CLOUD_SUBSCRIPTION_NOTIFICATION:
cloudClient[rakPeerInstanceIndex].OnSubscriptionNotification(packet, &myCloudClientCallback, &myCloudClientAllocator);
break;
default:
printf("Packet ID %i\n", packet->data[0]);
}
}
}
RakSleep(30);
}
// #med - add proper termination handling (then reenable the following code)
/*for (unsigned int i=0; i < RAKPEER_COUNT; i++)
{
SLNet::RakPeerInterface::DestroyInstance(rakPeer[i]);
}
return 0;*/
}

View File

@ -0,0 +1,260 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CloudTest</ProjectName>
<ProjectGuid>{1B94D21B-D47B-417F-A204-4B3C6FCD9A34}</ProjectGuid>
<RootNamespace>CloudTest</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CloudTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CloudTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CloudTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples/Command Console")

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CommandConsoleClient</ProjectName>
<ProjectGuid>{7F848364-AE8B-46CD-B422-F5E7B86C437E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)CommandConsoleClient.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CommandConsoleClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)CommandConsoleClient.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CommandConsoleClient.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,208 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Kbhit.h"
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#include <strings.h>
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
//linux doesn't have stricmp but strcasecmp is same functionality
#define stricmp strcasecmp
#endif
#include "slikenet/Gets.h"
int main()
{
SLNet::Packet *packet;
SLNet::RakPeerInterface *rakPeer;
bool isConnected=false;
rakPeer= SLNet::RakPeerInterface::GetInstance();
char command[512];
printf("This sample demonstrates connecting to the command console.\n");
printf("using the RakNet transport protocol\n");
printf("It's the equivalent of a secure telnet client\n");
printf("See the 'CommandConsoleServer' project.\n");
printf("Difficulty: Intermediate\n\n");
printf("RakNet secure command console.\n");
printf("Commands:\n");
printf("/Connect\n");
printf("/Disconnect\n");
printf("/Quit\n");
printf("Any other command goes to the remote console\n");
int exitcode = 0;
for(;;)
{
if (_kbhit())
{
Gets(command,sizeof(command));
if (_stricmp(command, "/quit")==0)
{
printf("Goodbye.\n");
rakPeer->Shutdown(500, 0);
break;
}
else if (_stricmp(command, "/disconnect")==0)
{
if (isConnected)
{
rakPeer->Shutdown(500, 0);
isConnected=false;
printf("Disconnecting.\n");
}
else
{
printf("Not currently connected.\n");
}
}
else if (_stricmp(command, "/connect")==0)
{
if (isConnected)
{
printf("Disconnect first.\n");
}
else
{
char ip[128];
char remotePort[64];
char password[512];
char localPort[64];
printf("Enter remote IP: ");
do {
Gets(ip, sizeof(ip));
} while(ip[0]==0);
printf("Enter remote port: ");
do {
Gets(remotePort,sizeof(remotePort));
} while(remotePort[0]==0);
const int intRemotePort = atoi(remotePort);
if ((intRemotePort < 0) || (intRemotePort > std::numeric_limits<unsigned short>::max())) {
printf("Specified remote port %d is outside valid bounds [0, %u]", intRemotePort, std::numeric_limits<unsigned short>::max());
exitcode = 1;
break;
}
printf("Enter local port (enter for 0): ");
Gets(localPort,sizeof(localPort));
if (localPort[0]==0)
{
strcpy_s(localPort, "0");
}
const int intLocalPort = atoi(localPort);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
exitcode = 2;
break;
}
printf("Enter console password (enter for none): ");
Gets(password,sizeof(password));
SLNet::SocketDescriptor socketDescriptor(static_cast<unsigned short>(intLocalPort),0);
if (rakPeer->Startup(1, &socketDescriptor, 1)== SLNet::RAKNET_STARTED)
{
int passwordLen;
if (password[0])
passwordLen=(int) strlen(password)+1;
else
passwordLen=0;
if (rakPeer->Connect(ip, static_cast<unsigned short>(intRemotePort), password, passwordLen)== SLNet::CONNECTION_ATTEMPT_STARTED)
printf("Connecting...\nNote: if the password is wrong the other system will ignore us.\n");
else
{
printf("Connect call failed.\n");
rakPeer->Shutdown(0, 0);
}
}
else
printf("Initialize call failed.\n");
}
}
else
{
if (isConnected)
{
SLNet::BitStream str;
str.Write((unsigned char) ID_TRANSPORT_STRING);
str.Write(command, (int) strlen(command)+1);
rakPeer->Send(&str, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
}
else
{
printf("You must be connected to send commands.\n");
}
}
}
packet = rakPeer->Receive();
if (packet)
{
switch (packet->data[0])
{
case ID_DISCONNECTION_NOTIFICATION:
printf("The server disconnected us.\n");
isConnected=false;
break;
case ID_CONNECTION_BANNED:
printf("We are banned from this server.\n");
isConnected=false;
break;
case ID_CONNECTION_ATTEMPT_FAILED:
printf("Connection attempt failed.\nThe password was wrong or there is no responsive machine at that IP/port.\n");
isConnected=false;
break;
case ID_NO_FREE_INCOMING_CONNECTIONS:
printf("Server is full.\n");
isConnected=false;
break;
case ID_CONNECTION_LOST:
printf("We lost the connection.\n");
isConnected=false;
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
printf("Connection accepted.\n");
isConnected=true;
break;
case ID_TRANSPORT_STRING:
printf("%s", packet->data+1);
break;
}
rakPeer->DeallocatePacket(packet);
}
// This sleep keeps RakNet responsive
#ifdef _WIN32
Sleep(30);
#else
usleep(30 * 1000);
#endif
}
return exitcode;
}

View File

@ -0,0 +1,14 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Samples/Command Console")

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CommandConsoleServer</ProjectName>
<ProjectGuid>{FAAEA8C7-DB88-4EF2-A78B-2A429283190B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)CommandConsoleServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CommandConsoleServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)CommandConsoleServer.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CommandConsoleServer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,92 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
/// \file
/// \brief Test the command console implementations
#include "slikenet/TCPInterface.h"
#include "slikenet/ConsoleServer.h"
#include "slikenet/commandparser.h"
#include "slikenet/TelnetTransport.h"
#include "slikenet/peerinterface.h"
#include "slikenet/LogCommandParser.h"
#include "slikenet/GetTime.h"
#include "slikenet/transport2.h"
#include "slikenet/LinuxStrings.h"
#include <stdio.h>
void TestTCPInterface(void);
void TestCommandServer(SLNet::TransportInterface *ti, unsigned short port, SLNet::RakPeerInterface *rakPeer);
int main(void)
{
SLNet::RakPeerInterface *rakPeer = SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor sd(60000,0);
rakPeer->Startup(128,&sd,1);
rakPeer->SetMaximumIncomingConnections(128);
SLNet::TelnetTransport tt;
TestCommandServer(&tt, 23, rakPeer); // Uncomment to use Telnet as a client. Telnet uses port 23 by default.
// SLNet::RakNetTransport2 rt2;
// rakPeer->AttachPlugin(&rt2);
// TestCommandServer(&rt2, 60000,rakPeer); // Uncomment to use RakNet as a client
return 1;
}
void TestCommandServer(SLNet::TransportInterface *ti, unsigned short port, SLNet::RakPeerInterface *rakPeer)
{
SLNet::ConsoleServer consoleServer;
SLNet::RakNetCommandParser rcp;
SLNet::LogCommandParser lcp;
SLNet::TimeMS lastLog=0;
printf("This sample demonstrates the command console server, which can be.\n");
printf("a standalone application or part of your game server. It allows you to\n");
printf("easily parse text strings sent from a client using either secure RakNet\n");
printf("or Telnet.\n");
printf("See the 'CommandConsoleClient' project for the RakNet client.\n");
printf("Difficulty: Intermediate\n\n");
printf("Command server started on port %i.\n", port);
consoleServer.AddCommandParser(&rcp);
consoleServer.AddCommandParser(&lcp);
consoleServer.SetTransportProvider(ti, port);
consoleServer.SetPrompt("> "); // Show this character when waiting for user input
rcp.SetRakPeerInterface(rakPeer);
lcp.AddChannel("TestChannel");
for(;;)
{
consoleServer.Update();
// Ignore raknet packets for this sample.
rakPeer->DeallocatePacket(rakPeer->Receive());
if (SLNet::GetTimeMS() > lastLog + 4000)
{
lcp.WriteLog("TestChannel", "Test of logger");
lastLog= SLNet::GetTimeMS();
}
#ifdef _WIN32
Sleep( 30 );
#else
usleep( 30 * 1000 );
#endif
}
}

View File

@ -0,0 +1,14 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,375 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>ComprehensivePCGame</ProjectName>
<ProjectGuid>{71B2CBB9-6C2D-4823-88F3-1AE926BDD726}</ProjectGuid>
<RootNamespace>ComprehensivePCGame</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ComprehensivePCGame.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ComprehensivePCGame.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;$(SolutionDir)DependentExtensions\miniupnpc-1.6.20120410;$(SolutionDir)DependentExtensions\jansson-2.4\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ComprehensivePCGame.cpp" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\connecthostport.c" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\igd_desc_parse.c" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minisoap.c" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpc.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4456;4706;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniwget.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minixml.c" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\portlistingparse.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\receivedata.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4389</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4389</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4389</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4389</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4389</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4389</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpcommands.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4245;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4245;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4245;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4245;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4245;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4245;4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnperrors.c" />
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpreplyparse.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\dump.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4701;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4701;4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\error.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\load.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244;4456</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244;4456</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\memory.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\pack_unpack.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strconv.c" />
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\utf.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\value.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4706</DisableSpecificWarnings>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\bsdqueue.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\codelength.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\connecthostport.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\declspec.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\igd_desc_parse.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minissdpc.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpc.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpcstrings.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpctypes.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniwget.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minixml.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\portlistingparse.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\receivedata.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpcommands.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnperrors.h" />
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpreplyparse.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_config.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_private.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.h" />
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\utf.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="miniupnpc-1.6.20120410">
<UniqueIdentifier>{0c36039d-ed7e-457a-a6a6-810097cc25b0}</UniqueIdentifier>
</Filter>
<Filter Include="jansson">
<UniqueIdentifier>{abc10d92-53f2-445e-bec7-4160f0c48ebc}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ComprehensivePCGame.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\connecthostport.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\igd_desc_parse.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minisoap.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpc.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniwget.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minixml.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\portlistingparse.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\receivedata.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpcommands.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnperrors.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpreplyparse.c">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\dump.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\error.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\load.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\memory.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\pack_unpack.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\strconv.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\utf.c">
<Filter>jansson</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\jansson-2.4\src\value.c">
<Filter>jansson</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\bsdqueue.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\codelength.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\connecthostport.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\declspec.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\igd_desc_parse.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minissdpc.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpc.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpcstrings.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniupnpctypes.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\miniwget.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\minixml.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\portlistingparse.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\receivedata.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpcommands.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnperrors.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\miniupnpc-1.6.20120410\upnpreplyparse.h">
<Filter>miniupnpc-1.6.20120410</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\hashtable.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_config.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\jansson_private.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\strbuffer.h">
<Filter>jansson</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\jansson-2.4\src\utf.h">
<Filter>jansson</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Internal Tests")

View File

@ -0,0 +1,251 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/BitStream.h"
#include <stdlib.h> // For atoi
#include <cstring> // For strlen
#include "slikenet/Rand.h"
#include "slikenet/statistics.h"
#include "slikenet/MessageIdentifiers.h"
#include <stdio.h>
#include "slikenet/GetTime.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
using namespace SLNet;
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#include <cstdio>
#endif
//#define _VERIFY_RECIPIENTS
#define _DO_PRINTF
#define NUM_PEERS 10
#define CONNECTIONS_PER_SYSTEM 4
int main(void)
{
RakPeerInterface *peers[NUM_PEERS];
unsigned short peerIndex;
float nextAction;
printf("This is just a test app to run a bit of everything to test for crashes.\n");
printf("Difficulty: Intermediate\n\n");
char data[8096];
int seed = 12345;
printf("Using seed %i\n", seed);
seedMT(seed);
for (unsigned short i=0; i < NUM_PEERS; i++)
{
peers[i]= SLNet::RakPeerInterface::GetInstance();
peers[i]->SetMaximumIncomingConnections(CONNECTIONS_PER_SYSTEM);
SLNet::SocketDescriptor socketDescriptor(60000+i, 0);
peers[i]->Startup(NUM_PEERS, &socketDescriptor, 1);
peers[i]->SetOfflinePingResponse("Offline Ping Data", (int)strlen("Offline Ping Data")+1);
}
for (unsigned short i=0; i < NUM_PEERS; i++)
{
peers[i]->Connect("127.0.0.1", 60000+(randomMT()%NUM_PEERS), 0, 0);
}
SLNet::TimeMS endTime = SLNet::GetTimeMS()+600000;
while (SLNet::GetTimeMS()<endTime)
{
nextAction = frandomMT();
if (nextAction < .04f)
{
// Initialize
peerIndex=randomMT()%NUM_PEERS;
SLNet::SocketDescriptor socketDescriptor(60000+peerIndex, 0);
peers[peerIndex]->Startup(NUM_PEERS, &socketDescriptor, 1);
peers[peerIndex]->Connect("127.0.0.1", 60000+randomMT() % NUM_PEERS, 0, 0);
}
else if (nextAction < .09f)
{
// Connect
peerIndex=randomMT()%NUM_PEERS;
peers[peerIndex]->Connect("127.0.0.1", 60000+randomMT() % NUM_PEERS, 0, 0);
}
else if (nextAction < .10f)
{
// Disconnect
peerIndex=randomMT()%NUM_PEERS;
// peers[peerIndex]->Shutdown(randomMT() % 100);
}
else if (nextAction < .12f)
{
// GetConnectionList
peerIndex=randomMT()%NUM_PEERS;
SystemAddress remoteSystems[NUM_PEERS];
unsigned short numSystems=NUM_PEERS;
peers[peerIndex]->GetConnectionList(remoteSystems, &numSystems);
if (numSystems>0)
{
#ifdef _DO_PRINTF
printf("%i: ", 60000+numSystems);
for (unsigned short i=0; i < numSystems; i++)
{
printf("%i: ", remoteSystems[i].GetPort());
}
printf("\n");
#endif
}
}
else if (nextAction < .14f)
{
// Send
int dataLength;
PacketPriority priority;
PacketReliability reliability;
unsigned char orderingChannel;
SystemAddress target;
bool broadcast;
// data[0]=ID_RESERVED1+(randomMT()%10);
data[0]=static_cast<unsigned char>(ID_USER_PACKET_ENUM);
dataLength=3+(randomMT()%8000);
// dataLength=600+(randomMT()%7000);
priority=(PacketPriority)(randomMT()%(int)NUMBER_OF_PRIORITIES);
reliability=(PacketReliability)(randomMT()%((int)RELIABLE_SEQUENCED+1));
orderingChannel=randomMT()%32;
peerIndex = randomMT() % NUM_PEERS;
if ((randomMT()%NUM_PEERS)==0)
target= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
else
target=peers[peerIndex]->GetSystemAddressFromIndex(randomMT()%NUM_PEERS);
broadcast=(randomMT()%2)?true:false;
#ifdef _VERIFY_RECIPIENTS
broadcast=false; // Temporarily in so I can check recipients
#endif
sprintf_s(data+3, 8093, "dataLength=%i priority=%i reliability=%i orderingChannel=%i target=%i broadcast=%i\n", dataLength, priority, reliability, orderingChannel, target.GetPort(), broadcast);
//unsigned short localPort=60000+i;
#ifdef _VERIFY_RECIPIENTS
memcpy((char*)data+1, (char*)&target.port, sizeof(unsigned short));
#endif
data[dataLength-1]=0;
peers[peerIndex]->Send(data, dataLength, priority, reliability, orderingChannel, target, broadcast);
}
else if (nextAction < .18f)
{
int dataLength;
PacketPriority priority;
PacketReliability reliability;
unsigned char orderingChannel;
SystemAddress target;
bool broadcast;
data[0]=ID_USER_PACKET_ENUM+(randomMT()%10);
dataLength=3+(randomMT()%8000);
// dataLength=600+(randomMT()%7000);
priority=(PacketPriority)(randomMT()%(int)NUMBER_OF_PRIORITIES);
reliability=(PacketReliability)(randomMT()%((int)RELIABLE_SEQUENCED+1));
orderingChannel=randomMT()%32;
peerIndex=randomMT()%NUM_PEERS;
if ((randomMT()%NUM_PEERS)==0)
target= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
else
target=peers[peerIndex]->GetSystemAddressFromIndex(randomMT()%NUM_PEERS);
broadcast=(randomMT()%2)?true:false;
#ifdef _VERIFY_RECIPIENTS
broadcast=false; // Temporarily in so I can check recipients
#endif
sprintf_s(data+3, 8093, "dataLength=%i priority=%i reliability=%i orderingChannel=%i target=%i broadcast=%i\n", dataLength, priority, reliability, orderingChannel, target.GetPort(), broadcast);
#ifdef _VERIFY_RECIPIENTS
memcpy((char*)data, (char*)&target.port, sizeof(unsigned short));
#endif
data[dataLength-1]=0;
}
else if (nextAction < .181f)
{
// CloseConnection
SystemAddress target;
peerIndex=randomMT()%NUM_PEERS;
target=peers[peerIndex]->GetSystemAddressFromIndex(randomMT()%NUM_PEERS);
peers[peerIndex]->CloseConnection(target, (randomMT()%2)?true:false, 0);
}
else if (nextAction < .20f)
{
// Offline Ping
peerIndex=randomMT()%NUM_PEERS;
peers[peerIndex]->Ping("127.0.0.1", 60000+(randomMT()%NUM_PEERS), (randomMT()%2)?true:false);
}
else if (nextAction < .21f)
{
// Online Ping
SystemAddress target;
peerIndex=randomMT()%NUM_PEERS;
target=peers[peerIndex]->GetSystemAddressFromIndex(randomMT()%NUM_PEERS);
peers[peerIndex]->Ping(target);
}
else if (nextAction < .24f)
{
}
else if (nextAction < .25f)
{
// GetStatistics
SystemAddress target, mySystemAddress;
RakNetStatistics *rss;
peerIndex=randomMT()%NUM_PEERS;
mySystemAddress=peers[peerIndex]->GetInternalID();
target=peers[peerIndex]->GetSystemAddressFromIndex(randomMT()%NUM_PEERS);
rss=peers[peerIndex]->GetStatistics(mySystemAddress);
if (rss)
{
StatisticsToString(rss, data, 8096, 0);
#ifdef _DO_PRINTF
printf("Statistics for local system %i:\n%s", mySystemAddress.GetPort(), data);
#endif
}
rss=peers[peerIndex]->GetStatistics(target);
if (rss)
{
StatisticsToString(rss, data, 8096, 0);
#ifdef _DO_PRINTF
printf("Statistics for target system %i:\n%s", target.GetPort(), data);
#endif
}
}
for (unsigned short i=0; i < NUM_PEERS; i++)
peers[i]->DeallocatePacket(peers[i]->Receive());
#ifdef _WIN32
Sleep(0);
#else
usleep(0);
#endif
}
for (unsigned short i=0; i < NUM_PEERS; i++)
SLNet::RakPeerInterface::DestroyInstance(peers[i]);
return 0;
}

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>ComprehensiveTest</ProjectName>
<ProjectGuid>{0360AC80-FD37-42D8-9141-B94B5C99B214}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ComprehensiveTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ComprehensiveTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ComprehensiveTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ComprehensiveTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
@echo off
if %1A==A goto error
if not %2n==n goto error
:again
start /b /wait %1
goto again
goto end
:error
echo Enter the exe to run endlessly.
:end

View File

@ -0,0 +1,17 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
IF (WIN32 AND NOT UNIX)
GETCURRENTFOLDER()
STANDARDSUBPROJECTWITHOPTIONS(${current_folder} "" "" "Dbghelp.lib")
ENDIF(WIN32 AND NOT UNIX)

View File

@ -0,0 +1,223 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, 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.
*/
// To compile link with Dbghelp.lib
// The callstack in release is the same as usual, which means it isn't all that accurate.
#ifdef WIN32
#include <stdio.h>
#include "slikenet/WindowsIncludes.h"
#pragma warning(push)
// disable warning 4091 (triggers for enum typedefs in DbgHelp.h in Windows SDK 7.1 and Windows SDK 8.1)
#pragma warning(disable:4091)
#include <DbgHelp.h>
#pragma warning(pop)
#include <stdlib.h>
#include <time.h>
#include "SendFileTo.h"
#include "CrashReporter.h"
#include "slikenet/EmailSender.h"
#include "slikenet/FileList.h"
#include "slikenet/FileOperations.h"
#include "slikenet/SimpleMutex.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
using namespace SLNet;
CrashReportControls CrashReporter::controls;
// More info at:
// http://www.codeproject.com/debug/postmortemdebug_standalone1.asp
// http://www.codeproject.com/debug/XCrashReportPt3.asp
// http://www.codeproject.com/debug/XCrashReportPt1.asp
// http://www.microsoft.com/msj/0898/bugslayer0898.aspx
LONG ProcessException(struct _EXCEPTION_POINTERS *ExceptionInfo)
{
char appDescriptor[_MAX_PATH];
if ((CrashReporter::controls.actionToTake & AOC_SILENT_MODE) == 0)
{
sprintf_s(appDescriptor, "%s has crashed.\nGenerate a report?", CrashReporter::controls.appName);
if (::MessageBoxA(nullptr, appDescriptor, "Crash Reporter", MB_YESNO )==IDNO)
{
return EXCEPTION_CONTINUE_SEARCH;
}
}
char dumpFilepath[_MAX_PATH];
char dumpFilename[_MAX_PATH];
sprintf_s(appDescriptor, "%s %s - %s %s", CrashReporter::controls.appName, CrashReporter::controls.appVersion, __DATE__, __TIME__);
if ((CrashReporter::controls.actionToTake & AOC_EMAIL_WITH_ATTACHMENT) ||
(CrashReporter::controls.actionToTake & AOC_WRITE_TO_DISK)
)
{
if (CrashReporter::controls.actionToTake & AOC_WRITE_TO_DISK)
{
strcpy_s(dumpFilepath, CrashReporter::controls.pathToMinidump);
WriteFileWithDirectories(dumpFilepath,0,0);
AddSlash(dumpFilepath);
}
else
{
// Write to a temporary directory if the user doesn't want the dump on the harddrive.
if (!GetTempPathA( _MAX_PATH, dumpFilepath ))
dumpFilepath[0]=0;
}
unsigned i, dumpFilenameLen;
strcpy_s(dumpFilename, appDescriptor);
dumpFilenameLen=(unsigned) strlen(appDescriptor);
for (i=0; i < dumpFilenameLen; i++)
if (dumpFilename[i]==':' || dumpFilename[i]=='/' || dumpFilename[i]=='\\')
dumpFilename[i]='.'; // Remove illegal characters from filename
strcat_s(dumpFilepath, dumpFilename);
strcat_s(dumpFilepath, ".dmp");
HANDLE hFile = CreateFileA(dumpFilepath,GENERIC_WRITE, FILE_SHARE_READ, nullptr,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL, nullptr);
if (hFile==INVALID_HANDLE_VALUE)
return EXCEPTION_CONTINUE_SEARCH;
MINIDUMP_EXCEPTION_INFORMATION eInfo;
eInfo.ThreadId = GetCurrentThreadId();
eInfo.ExceptionPointers = ExceptionInfo;
eInfo.ClientPointers = FALSE;
if (MiniDumpWriteDump(
GetCurrentProcess(),
GetCurrentProcessId(),
hFile,
(MINIDUMP_TYPE)CrashReporter::controls.minidumpType,
ExceptionInfo ? &eInfo : nullptr,
nullptr,
nullptr)==false)
return EXCEPTION_CONTINUE_SEARCH;
CloseHandle(hFile);
}
char silentModeEmailBody[1024];
char subject[1204];
if (CrashReporter::controls.actionToTake & AOC_EMAIL_NO_ATTACHMENT)
{
strcpy_s(subject, CrashReporter::controls.emailSubjectPrefix);
strcat_s(subject, appDescriptor);
if (CrashReporter::controls.actionToTake & AOC_SILENT_MODE)
{
sprintf_s(silentModeEmailBody, "%s%s version %s has crashed.\r\nIt was compiled on %s %s.\r\n", CrashReporter::controls.emailBody, CrashReporter::controls.appName,CrashReporter::controls.appVersion, __DATE__, __TIME__);
if (CrashReporter::controls.actionToTake & AOC_WRITE_TO_DISK)
sprintf_s(silentModeEmailBody+strlen(silentModeEmailBody), 1024-strlen(silentModeEmailBody), "Minidump written to %s \r\n", dumpFilepath);
// Silently send email with attachment
EmailSender emailSender;
emailSender.Send(CrashReporter::controls.SMTPServer,
25,
CrashReporter::controls.SMTPAccountName,
CrashReporter::controls.emailRecipient,
CrashReporter::controls.emailSender,
CrashReporter::controls.emailRecipient,
subject,
silentModeEmailBody,
0,
false,
CrashReporter::controls.emailPassword);
}
else
{
CSendFileTo sendFile;
sendFile.SendMail(0, 0, 0, subject, CrashReporter::controls.emailBody, CrashReporter::controls.emailRecipient);
}
}
else if (CrashReporter::controls.actionToTake & AOC_EMAIL_WITH_ATTACHMENT)
{
strcpy_s(subject, CrashReporter::controls.emailSubjectPrefix);
strcat_s(subject, dumpFilename);
strcat_s(dumpFilename, ".dmp");
if (CrashReporter::controls.actionToTake & AOC_SILENT_MODE)
{
sprintf_s(silentModeEmailBody, "%s%s version %s has crashed.\r\nIt was compiled on %s %s.\r\n", CrashReporter::controls.emailBody, CrashReporter::controls.appName,CrashReporter::controls.appVersion, __DATE__, __TIME__);
if (CrashReporter::controls.actionToTake & AOC_WRITE_TO_DISK)
sprintf_s(silentModeEmailBody+strlen(silentModeEmailBody), 1024-strlen(silentModeEmailBody), "Minidump written to %s \r\n", dumpFilepath);
// Silently send email with attachment
EmailSender emailSender;
FileList files;
files.AddFile(dumpFilepath,dumpFilename,FileListNodeContext(0,0,0,0));
emailSender.Send(CrashReporter::controls.SMTPServer,
25,
CrashReporter::controls.SMTPAccountName,
CrashReporter::controls.emailRecipient,
CrashReporter::controls.emailSender,
CrashReporter::controls.emailRecipient,
subject,
silentModeEmailBody,
&files,
false,
CrashReporter::controls.emailPassword);
}
else
{
CSendFileTo sendFile;
sendFile.SendMail(0, dumpFilepath, dumpFilename, subject, CrashReporter::controls.emailBody, CrashReporter::controls.emailRecipient);
}
}
return EXCEPTION_EXECUTE_HANDLER;
}
LONG WINAPI CrashExceptionFilter( struct _EXCEPTION_POINTERS *ExceptionInfo )
{
// Mutex here due to http://www.jenkinssoftware.com/raknet/forum/index.php?topic=2305.0;topicseen
static SimpleMutex crashExceptionFilterMutex;
crashExceptionFilterMutex.Lock();
LONG retVal = ProcessException(ExceptionInfo);
crashExceptionFilterMutex.Unlock();
return retVal;
}
void DumpMiniDump(PEXCEPTION_POINTERS excpInfo)
{
if (excpInfo == nullptr)
{
// Generate exception to get proper context in dump
__try
{
RaiseException(EXCEPTION_BREAKPOINT, 0, 0, nullptr);
}
__except(DumpMiniDump(GetExceptionInformation()),EXCEPTION_EXECUTE_HANDLER)
{
}
}
else
{
ProcessException(excpInfo);
}
}
// #define _DEBUG_CRASH_REPORTER
void CrashReporter::Start(CrashReportControls *input)
{
memcpy(&controls, input, sizeof(CrashReportControls));
#ifndef _DEBUG_CRASH_REPORTER
SetUnhandledExceptionFilter(CrashExceptionFilter);
#endif
}
#endif //WIN32

View File

@ -0,0 +1,142 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017-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.
*/
#ifndef __CRASH_REPORTER_H
#define __CRASH_REPORTER_H
// This is a crash reporter that will send a minidump by email on unhandled exceptions
// This normally only runs if you are not currently debugging.
// To send reports while debugging (mostly to test this class), define _DEBUG_CRASH_REPORTER
// and put your code in a try/except block such as
//
// extern void DumpMiniDump(PEXCEPTION_POINTERS excpInfo);
//
// void main(void)
//{
//__try
//{
// RunGame();
//}
//__except(DumpMiniDump(GetExceptionInformation()),EXCEPTION_EXECUTE_HANDLER)
//{
//}
//}
// The minidump can be opened in visual studio and will show you where the crash occurred and give you the local variable values.
//
// How to use the minidump:
//
// Put the minidump on your harddrive and double click it. It will open Visual Studio. It will look for the exe that caused the crash in the directory
// that the program that crashed was running at. If it can't find this exe, or if it is different, it will look in the current
// directory for that exe. If it still can't find it, or if it is different, it will load Visual Studio and indicate that it can't find
// the executable module. No source code will be shown at that point. However, you can specify modpath=<pathToExeDirectory> in the
// project properties window for "Command Arguments".
// The best solution is copy the .dmp to a directory containing a copy of the exe that crashed.
//
// On load, Visual Studio will look for the .pdb, which it uses to find the source code files and other information. This is fine as long as the source
// code files on your harddrive match those that were used to create the exe. If they don't, you will see source code but it will be the wrong code.
// There are three ways to deal with this.
//
// The first way is to change the path to your source code so it won't find the wrong code automatically.
// This will cause the debugger to not find the source code pointed to in the .pdb . You will be prompted for the location of the correct source code.
//
// The second way is to build the exe on a different path than what you normally program with. For example, when you program you use c:/Working/Mygame
// When you release builds, you do at c:/Version2.2/Mygame . After a build, you keep the source files, the exe, and the pdb
// on a harddrive at that location. When you get a crash .dmp, copy it to the same directory as the exe, ( c:/Version2.2/Mygame/bin )
// This way the .pdb will point to the correct sources to begin wtih.
//
// The third way is save build labels or branches in source control and get that version (you only need source code + .exe + .pdb) before debugging.
// After debugging, restore your previous work.
//
// To use:
// #include "DbgHelp.h"
// Link with Dbghelp.lib ws2_32.lib
#include "slikenet/defines.h" // used for SLNet -> RakNet namespace change in RAKNET_COMPATIBILITY mode
namespace SLNet {
// Possible actions to take on a crash. If you want to restart the app as well, see the CrashRelauncher sample.
enum CrashReportAction
{
// Send an email (mutually exclusive with AOC_EMAIL_WITH_ATTACHMENT)
AOC_EMAIL_NO_ATTACHMENT=1,
// Send an email and attach the minidump (mutually exclusive with AOC_EMAIL_NO_ATTACHMENT)
AOC_EMAIL_WITH_ATTACHMENT=2,
// Write the minidump to disk in a specified directory
AOC_WRITE_TO_DISK=4,
// In silent mode there are no prompts. This is useful for an unmonitored application.
AOC_SILENT_MODE=8
};
/// Holds all the parameters to CrashReporter::Start
struct CrashReportControls
{
// Bitwise OR of CrashReportAction values to determine what to do on a crash.
int actionToTake;
// Used to generate the dump filename. Required with AOC_EMAIL_WITH_ATTACHMENT or AOC_WRITE_TO_DISK
char appName[128];
char appVersion[128];
// Used with AOC_WRITE_TO_DISK . Path to write to. Not the filename, just the path. Empty string means the current directory.
char pathToMinidump[260];
// Required with AOC_EMAIL_* & AOC_SILENT_MODE . The SMTP server to send emails from.
char SMTPServer[128];
// Required with AOC_EMAIL_* & AOC_SILENT_MODE . The account name to send emails with (probably your email address).
char SMTPAccountName[64];
// Required with AOC_EMAIL_* & AOC_SILENT_MODE . What to put in the sender field of the email.
char emailSender[64];
// Required with AOC_EMAIL_* . What to put in the subject of the email.
char emailSubjectPrefix[128];
// Required with AOC_EMAIL_* as long as you are NOT in AOC_SILENT_MODE . What to put in the body of the email.
char emailBody[1024];
// Required with AOC_EMAIL_* . Who to send the email to.
char emailRecipient[64];
// Required with AOC_EMAIL_* . What password to use to send the email under TLS, if required
char emailPassword[64];
// How much memory to write. MiniDumpNormal is the least but doesn't seem to give correct globals. MiniDumpWithDataSegs gives more.
// Include "DbgHelp.h" for these enumerations.
int minidumpType;
};
/// \brief On an unhandled exception, will save a minidump and email it.
/// A minidump can be opened in visual studio to give the callstack and local variables at the time of the crash.
/// It has the same amount of information as if you crashed while debugging in the relevant mode. So Debug tends to give
/// accurate stacks and info while Release does not.
///
/// Minidumps are only accurate for the code as it was compiled at the date of the release. So you should label releases in source control
/// and put that label number in the 'appVersion' field.
class CrashReporter
{
public:
static void Start(CrashReportControls *input);
static CrashReportControls controls;
};
} // namespace SLNet
#endif

View File

@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CrashReporter</ProjectName>
<ProjectGuid>{F1DC7171-0188-492F-9FC3-733B285836D2}</ProjectGuid>
<RootNamespace>CrashReporter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CrashReporter.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CrashReporter.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>Dbghelp.lib;./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CrashReporter.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="SendFileTo.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CrashReporter.h" />
<ClInclude Include="SendFileTo.h" />
</ItemGroup>
<ItemGroup>
<None Include="VTune\CrashReporter.vpj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CrashReporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SendFileTo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CrashReporter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="SendFileTo.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="VTune\CrashReporter.vpj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,121 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "slikenet/WindowsIncludes.h"
#include "SendFileTo.h"
#include <shlwapi.h>
#include <tchar.h>
#include <stdio.h>
#include <direct.h>
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
bool CSendFileTo::SendMail(HWND hWndParent, const char *strAttachmentFilePath, const char *strAttachmentFileName, const char *strSubject, const char *strBody, const char *strRecipient)
{
// if (strAttachmentFileName==0)
// return false;
// if (!hWndParent || !::IsWindow(hWndParent))
// return false;
HINSTANCE hMAPI = LoadLibrary(_T("MAPI32.DLL"));
if (!hMAPI)
return false;
ULONG (PASCAL *SendMail)(ULONG, ULONG_PTR, MapiMessage*, FLAGS, ULONG);
(FARPROC&)SendMail = GetProcAddress(hMAPI, "MAPISendMail");
if (!SendMail)
return false;
// char szFileName[_MAX_PATH];
// char szPath[_MAX_PATH];
char szName[_MAX_PATH];
char szSubject[_MAX_PATH];
char szBody[_MAX_PATH];
char szAddress[_MAX_PATH];
char szSupport[_MAX_PATH];
//strcpy_s(szFileName, strAttachmentFileName);
//strcpy_s(szPath, strAttachmentFilePath);
if (strAttachmentFileName)
strcpy_s(szName, strAttachmentFileName);
strcpy_s(szSubject, strSubject);
strcpy_s(szBody, strBody);
sprintf_s(szAddress, "SMTP:%s", strRecipient);
//strcpy_s(szSupport, "Support");
char fullPath[_MAX_PATH];
if (strAttachmentFileName && strAttachmentFilePath)
{
if (strlen(strAttachmentFilePath)<3 ||
strAttachmentFilePath[1]!=':' ||
(strAttachmentFilePath[2]!='\\' &&
strAttachmentFilePath[2]!='/'))
{
// Make relative paths absolute
_getcwd(fullPath, _MAX_PATH);
strcat_s(fullPath, "/");
strcat_s(fullPath, strAttachmentFilePath);
}
else
strcpy_s(fullPath, strAttachmentFilePath);
// All slashes have to be \\ and not /
int len=(unsigned int)strlen(fullPath);
int i;
for (i=0; i < len; i++)
{
if (fullPath[i]=='/')
fullPath[i]='\\';
}
}
MapiFileDesc fileDesc;
if (strAttachmentFileName && strAttachmentFilePath)
{
ZeroMemory(&fileDesc, sizeof(fileDesc));
fileDesc.nPosition = (ULONG)-1;
fileDesc.lpszPathName = fullPath;
fileDesc.lpszFileName = szName;
}
MapiRecipDesc recipDesc;
ZeroMemory(&recipDesc, sizeof(recipDesc));
recipDesc.lpszName = szSupport;
recipDesc.ulRecipClass = MAPI_TO;
recipDesc.lpszName = szAddress+5;
recipDesc.lpszAddress = szAddress;
MapiMessage message;
ZeroMemory(&message, sizeof(message));
message.nRecipCount = 1;
message.lpRecips = &recipDesc;
message.lpszSubject = szSubject;
message.lpszNoteText = szBody;
if (strAttachmentFileName && strAttachmentFilePath)
{
message.nFileCount = 1;
message.lpFiles = &fileDesc;
}
int nError = SendMail(0, (ULONG_PTR)hWndParent, &message, MAPI_LOGON_UI|MAPI_DIALOG, 0);
if (nError != SUCCESS_SUCCESS && nError != MAPI_USER_ABORT && nError != MAPI_E_LOGIN_FAILURE)
return false;
return true;
}

View File

@ -0,0 +1,31 @@
/*
* Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
* Modified work: Copyright (c) 2017, 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.
*/
// Mostly from http://www.codeproject.com/internet/SendTo.asp and
// Also see http://www.codeguru.com/cpp/i-n/network/messaging/article.php/c5417/
#ifndef __SENDFILETO_H__
#define __SENDFILETO_H__
#include "slikenet/WindowsIncludes.h"
#include <mapi.h>
class CSendFileTo
{
public:
bool SendMail(HWND hWndParent, const char *strAttachmentFilePath, const char *strAttachmentFileName,const char *strSubject, const char *strBody, const char *strRecipient);
};
#endif

View File

@ -0,0 +1,172 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
// Windows only sample to catch unhandled exceptions and email a minidump.
// The minidump can be opened in visual studio and will show you where the crash occurred and give you the local variable values.
//
// How to use the minidump:
//
// Put the minidump on your harddrive and double click it. It will open Visual Studio. It will look for the exe that caused the crash in the directory
// that the program that crashed was running at. If it can't find this exe, or if it is different, it will look in the current
// directory for that exe. If it still can't find it, or if it is different, it will load Visual Studio and indicate that it can't find
// the executable module. No source code will be shown at that point. However, you can specify modpath=<pathToExeDirectory> in the
// project properties window for "Command Arguments".
// The best solution is copy the .dmp to a directory containing a copy of the exe that crashed.
//
// On load, Visual Studio will look for the .pdb, which it uses to find the source code files and other information. This is fine as long as the source
// code files on your harddrive match those that were used to create the exe. If they don't, you will see source code but it will be the wrong code.
// There are three ways to deal with this.
//
// The first way is to change the path to your source code so it won't find the wrong code automatically.
// This will cause the debugger to not find the source code pointed to in the .pdb . You will be prompted for the location of the correct source code.
//
// The second way is to build the exe on a different path than what you normally program with. For example, when you program you use c:/Working/Mygame
// When you release builds, you do at c:/Version2.2/Mygame . After a build, you keep the source files, the exe, and the pdb
// on a harddrive at that location. When you get a crash .dmp, copy it to the same directory as the exe, ( c:/Version2.2/Mygame/bin )
// This way the .pdb will point to the correct sources to begin wtih.
//
// The third way is save build labels or branches in source control and get that version (you only need source code + .exe + .pdb) before debugging.
// After debugging, restore your previous work.
#include "slikenet/SocketLayer.h"
#include "CrashReporter.h" // This is the only required file for the crash reporter. You must link in Dbghelp.lib
#include <stdio.h> // Printf, for the sample code
#include "slikenet/Kbhit.h" // getch, for the sample code
#pragma warning(push)
// disable warning 4091 (triggers for enum typedefs in DbgHelp.h in Windows SDK 7.1 and Windows SDK 8.1)
#pragma warning(disable:4091)
#include <DbgHelp.h>
#pragma warning(pop)
#include "slikenet/Gets.h"
void function1(int a)
{
int *crashPtr=0;
// Keep crashPtr from getting compiled out
printf("Now crashing!!!! %p\n", crashPtr);
// If it crashes here in your debugger that is because you didn't define _DEBUG_CRASH_REPORTER to catch it.
// The normal mode of the crash handler is to only catch when you are NOT debugging (started through ctrl-f5)
*crashPtr=a;
}
void RunGame(void)
{
int a=10;
int b=20;
function1(a);
printf("%i", b);
}
//#define _DEBUG_CRASH_REPORTER
// If you don't plan to debug the crash reporter itself, you can remove _DEBUG_CRASH_REPORTER
#ifdef _DEBUG_CRASH_REPORTER
#include "slikenet/WindowsIncludes.h"
extern void DumpMiniDump(PEXCEPTION_POINTERS excpInfo);
#endif
void main(void)
{
printf("Demonstrates the crash reporter.\n");
printf("This program will prompt you for a variety of actions to take on crash.\n");
printf("If so desired, it will generate a minidump which can be opened in visual studio\n");
printf("to debug the crash.\n\n");
SLNet::CrashReportControls controls;
controls.actionToTake=0;
printf("Send an email? (y/n)\n");
if (_getch()=='y')
{
printf("Attach the mini-dump to the email? (y/n)\n");
if (_getch()=='y')
controls.actionToTake|= SLNet::AOC_EMAIL_WITH_ATTACHMENT;
else
controls.actionToTake|= SLNet::AOC_EMAIL_NO_ATTACHMENT;
}
printf("Write mini-dump to disk? (y/n)\n");
if (_getch()=='y')
controls.actionToTake|= SLNet::AOC_WRITE_TO_DISK;
printf("Handle crashes in silent mode (no prompts)? (y/n)\n");
if (_getch()=='y')
controls.actionToTake|= SLNet::AOC_SILENT_MODE;
if ((controls.actionToTake & SLNet::AOC_EMAIL_WITH_ATTACHMENT) || (controls.actionToTake & SLNet::AOC_EMAIL_NO_ATTACHMENT))
{
if (controls.actionToTake & SLNet::AOC_SILENT_MODE)
{
printf("Enter SMTP Server: ");
Gets(controls.SMTPServer,sizeof(controls.SMTPServer));
if (controls.SMTPServer[0]==0)
return;
printf("Enter SMTP account name: ");
Gets(controls.SMTPAccountName,sizeof(controls.SMTPAccountName));
if (controls.SMTPAccountName[0]==0)
return;
printf("Enter sender email address: ");
Gets(controls.emailSender,sizeof(controls.emailSender));
}
printf("Enter email recipient email address: ");
Gets(controls.emailRecipient,sizeof(controls.emailRecipient));
if (controls.emailRecipient[0]==0)
return;
printf("Enter subject prefix, if any: ");
Gets(controls.emailSubjectPrefix,sizeof(controls.emailSubjectPrefix));
if ((controls.actionToTake & SLNet::AOC_SILENT_MODE)==0)
{
printf("Enter text to write in email body: ");
Gets(controls.emailBody,sizeof(controls.emailBody));
}
}
if (controls.actionToTake & SLNet::AOC_WRITE_TO_DISK)
{
printf("Enter disk path to write to (ENTER for current directory): ");
Gets(controls.pathToMinidump,sizeof(controls.pathToMinidump));
}
printf("Enter application name: ");
Gets(controls.appName,sizeof(controls.appName));
printf("Enter application version: ");
Gets(controls.appVersion,sizeof(controls.appVersion));
// MiniDumpNormal will not give you SocketLayer::I correctly but is small (like 15K)
// MiniDumpWithDataSegs is much bigger (391K) but does give you SocketLayer::I correctly.
controls.minidumpType=MiniDumpWithDataSegs;
// You must call Start before any crashes will be reported.
SLNet::CrashReporter::Start(&controls);
printf("Crash reporter started.\n");
// If you don't plan to debug the crash reporter itself, you can remove the __try within _DEBUG_CRASH_REPORTER
#ifdef _DEBUG_CRASH_REPORTER
__try
#endif
{
RunGame();
}
// If you don't plan to debug the crash reporter itself, you can remove the DumpMiniDump code within _DEBUG_CRASH_REPORTER
#ifdef _DEBUG_CRASH_REPORTER
__except(DumpMiniDump(GetExceptionInformation()),EXCEPTION_EXECUTE_HANDLER)
{
}
#endif
}

View File

@ -0,0 +1,13 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})
VSUBFOLDER(${current_folder} "Internal Tests")

View File

@ -0,0 +1,145 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
/// \file
/// \brief Tests connecting two peers at the same time with the internet simulator running.
#include "slikenet/peerinterface.h"
#include "slikenet/PacketLogger.h"
#include "slikenet/Rand.h"
#include "slikenet/Kbhit.h"
#include <stdio.h> // Printf
#include "slikenet/sleep.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/GetTime.h"
using namespace SLNet;
int main()
{
printf("An internal test to test two peers connecting to each other\n");
printf("at the same time. This causes bugs so I fix them here\n");
RakPeerInterface *rakPeer1, *rakPeer2;
rakPeer1=RakPeerInterface::GetInstance();
rakPeer2=RakPeerInterface::GetInstance();
rakPeer1->SetMaximumIncomingConnections(8);
rakPeer2->SetMaximumIncomingConnections(8);
int gotConnectionRequestAccepted[2];
int gotNewIncomingConnection[2];
Packet *packet;
SocketDescriptor sd1(60000,0);
SocketDescriptor sd2(2000,0);
unsigned short numSystems[2];
for(;;)
{
gotConnectionRequestAccepted[0]=0;
gotConnectionRequestAccepted[1]=0;
gotNewIncomingConnection[0]=0;
gotNewIncomingConnection[1]=0;
numSystems[0]=0;
numSystems[1]=0;
rakPeer1->Startup(1,&sd1, 1);
rakPeer2->Startup(1,&sd2, 1);
RakSleep(100);
rakPeer1->Connect("127.0.0.1", 2000, 0, 0);
rakPeer2->Connect("127.0.0.1", 60000, 0, 0);
RakSleep(100);
for (packet=rakPeer1->Receive(); packet; rakPeer1->DeallocatePacket(packet), packet=rakPeer1->Receive())
{
if (packet->data[0]==ID_NEW_INCOMING_CONNECTION)
gotNewIncomingConnection[0]++;
else if (packet->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
gotConnectionRequestAccepted[0]++;
else if (packet->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
printf("Error on rakPeer1, got ID_CONNECTION_ATTEMPT_FAILED\n");
else if (packet->data[0]==ID_ALREADY_CONNECTED)
printf("Got ID_ALREADY_CONNECTED on rakPeer1, (not necessarily a failure)\n");
}
for (packet=rakPeer2->Receive(); packet; rakPeer2->DeallocatePacket(packet), packet=rakPeer2->Receive())
{
if (packet->data[0]==ID_NEW_INCOMING_CONNECTION)
gotNewIncomingConnection[1]++;
else if (packet->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
gotConnectionRequestAccepted[1]++;
else if (packet->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
printf("Error on rakPeer2, got ID_CONNECTION_ATTEMPT_FAILED\n");
else if (packet->data[0]==ID_ALREADY_CONNECTED)
printf("Got ID_ALREADY_CONNECTED on rakPeer2, (not necessarily a failure)\n");
}
rakPeer1->GetConnectionList(0,&numSystems[0]);
rakPeer2->GetConnectionList(0,&numSystems[1]);
if (gotConnectionRequestAccepted[0]==1 && gotConnectionRequestAccepted[1]==1)
{
printf("Test passed\n");
}
else if (numSystems[0]!=1 || numSystems[1]!=1)
{
printf("Test failed, system 1 has %i connections and system 2 has %i connections.\n", numSystems[0], numSystems[1]);
}
else if (gotConnectionRequestAccepted[0]==0 && gotConnectionRequestAccepted[1]==0)
{
printf("Test failed, ID_CONNECTION_REQUEST_ACCEPTED is false for both instances\n");
}
else if (gotNewIncomingConnection[0]==1 && gotNewIncomingConnection[1]==1)
{
printf("Test failed, ID_NEW_INCOMING_CONNECTION is true for both instances\n");
}
else if (gotNewIncomingConnection[0]==0 && gotNewIncomingConnection[1]==0)
{
printf("Test failed, ID_NEW_INCOMING_CONNECTION is false for both instances\n");
}
else if (gotConnectionRequestAccepted[0]==1 && gotNewIncomingConnection[1]==0)
{
printf("Test failed, ID_CONNECTION_REQUEST_ACCEPTED for first instance, but not ID_NEW_INCOMING_CONNECTION for second\n");
}
else if (gotConnectionRequestAccepted[1]==1 && gotNewIncomingConnection[0]==0)
{
printf("Test failed, ID_CONNECTION_REQUEST_ACCEPTED for second instance, but not ID_NEW_INCOMING_CONNECTION for first\n");
}
else if (gotConnectionRequestAccepted[0]+gotConnectionRequestAccepted[1]!=1)
{
printf("Test failed, does not have exactly one instance of ID_CONNECTION_REQUEST_ACCEPTED\n");
}
else if (gotNewIncomingConnection[0]+gotNewIncomingConnection[1]!=1)
{
printf("Test failed, does not have exactly one instance of ID_NEW_INCOMING_CONNECTION\n");
}
else if (gotConnectionRequestAccepted[0]+
gotConnectionRequestAccepted[1]+
gotNewIncomingConnection[0]+
gotNewIncomingConnection[1]!=2)
{
printf("Test failed, does not have exactly one instance of ID_CONNECTION_REQUEST_ACCEPTED and one instance of ID_NEW_INCOMING_CONNECTION\n");
}
else
printf("Test passed\n");
rakPeer1->Shutdown(0);
rakPeer2->Shutdown(0);
RakSleep(100);
}
// #med - add proper termination handling (then reenable the following code)
// return 0;
}

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>CrossConnectionTest</ProjectName>
<ProjectGuid>{7F2EDC16-718B-4C88-A50F-A0334791C3E1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CrossConnectionTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)CrossConnectionTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CrossConnectionTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CrossConnectionTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,25 @@
#
# 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) 2017-2019, 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.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
project(${current_folder})
include_directories(${SLIKENET_HEADER_FILES} ./)
add_executable(${current_folder} DirectoryDeltaTransferTest.cpp)
target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS})
set_target_properties(${current_folder} PROPERTIES PROJECT_GROUP Samples)

View File

@ -0,0 +1,181 @@
/*
* Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*/
#include "RakNetworkFactory.h"
#include "GetTime.h"
#include "RakPeerInterface.h"
#include "PacketEnumerations.h"
#include "RakNetStatistics.h"
#include "DirectoryDeltaTransfer.h"
#include "FileListTransfer.h"
#include <cstdio>
#include <stdlib.h>
#include <conio.h>
#include "FileList.h"
#include "DataCompressor.h"
#include "FileListTransferCBInterface.h"
#ifdef _WIN32
#include <windows.h> // Sleep
#else
#include <unistd.h> // usleep
#endif
class TestCB : public FileListTransferCBInterface
{
public:
void OnFile(
unsigned fileIndex,
char *filename,
unsigned char *fileData,
unsigned compressedTransmissionLength,
unsigned finalDataLength,
unsigned short setID,
unsigned setCount,
unsigned setTotalCompressedTransmissionLength,
unsigned setTotalFinalLength)
{
printf("%i. %i/%i %s %ib->%ib / %ib->%ib\n", setID, fileIndex, setCount, filename, compressedTransmissionLength, finalDataLength, setTotalCompressedTransmissionLength, setTotalFinalLength);
}
} transferCallback;
int main(void)
{
char ch;
RakPeerInterface *rakPeer;
// directoryDeltaTransfer is the main plugin that does the work for this sample.
DirectoryDeltaTransfer directoryDeltaTransfer;
// The fileListTransfer plugin is used by the DirectoryDeltaTransfer plugin and must also be registered (you could use this yourself too if you wanted, of course).
FileListTransfer fileListTransfer;
rakPeer = RakNetworkFactory::GetRakPeerInterface();
rakPeer->AttachPlugin(&directoryDeltaTransfer);
rakPeer->AttachPlugin(&fileListTransfer);
directoryDeltaTransfer.SetFileListTransferPlugin(&fileListTransfer);
printf("This sample demonstrates the plugin to incrementally transfer compressed\n");
printf("deltas of directories. In essence, it's a simple autopatcher.\n");
printf("Unlike the full autopatcher, it has no dependencies. It is suitable for\n");
printf("patching from non-dedicated servers at runtime.\n");
printf("Difficulty: Intermediate\n\n");
printf("Enter listen port, or hit enter to choose automatically\n");
unsigned short localPort;
char str[256];
gets(str);
if (str[0]==0)
localPort=60000;
else
localPort=atoi(str);
if (rakPeer->Initialize(8,localPort,30,0)==false)
{
RakNetworkFactory::DestroyRakPeerInterface(rakPeer);
printf("RakNet initialize failed. Possibly duplicate port.\n");
return 1;
}
rakPeer->SetMaximumIncomingConnections(8);
printf("Commands:\n");
printf("(S)et application directory.\n");
printf("(A)dd allowed uploads from subdirectory.\n");
printf("(D)ownload from subdirectory.\n");
printf("(C)lear allowed uploads.\n");
printf("C(o)nnect to another system.\n");
printf("(Q)uit.\n");
Packet *p;
while (1)
{
// Process packets
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_NEW_INCOMING_CONNECTION)
printf("ID_NEW_INCOMING_CONNECTION\n");
else if (p->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
if (kbhit())
{
ch=getch();
if (ch=='s')
{
printf("Enter application directory\n");
gets(str);
if (str[0]==0)
strcpy(str, "C:/RakNet");
directoryDeltaTransfer.SetApplicationDirectory(str);
printf("This directory will be prefixed to upload and download subdirectories.\n");
}
else if (ch=='a')
{
printf("Enter uploads subdirectory\n");
gets(str);
directoryDeltaTransfer.AddUploadsFromSubdirectory(str);
printf("%i files for upload.\n", directoryDeltaTransfer.GetNumberOfFilesForUpload());
}
else if (ch=='d')
{
char subdir[256];
char outputSubdir[256];
printf("Enter remote subdirectory to download from.\n");
printf("This directory may be any uploaded directory, or a subdir therein.\n");
gets(subdir);
printf("Enter subdirectory to output to.\n");
gets(outputSubdir);
unsigned short setId;
setId=directoryDeltaTransfer.DownloadFromSubdirectory(subdir, outputSubdir, true, rakPeer->GetPlayerIDFromIndex(0), &transferCallback, HIGH_PRIORITY, 0);
if (setId==(unsigned short)-1)
printf("Download failed. Host unreachable.\n");
else
printf("Downloading set %i\n", setId);
}
else if (ch=='c')
{
directoryDeltaTransfer.ClearUploads();
printf("Uploads cleared.\n");
}
else if (ch=='o')
{
char host[256];
printf("Enter host IP: ");
gets(host);
if (host[0]==0)
strcpy(host, "127.0.0.1");
unsigned short remotePort;
printf("Enter host port: ");
gets(str);
if (str[0]==0)
remotePort=60000;
else
remotePort=atoi(str);
rakPeer->Connect(host, remotePort, 0, 0);
printf("Connecting.\n");
}
else if (ch=='q')
{
printf("Bye!\n");
break;
}
}
}
RakNetworkFactory::DestroyRakPeerInterface(rakPeer);
return 0;
}

View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>DirectoryDeltaTransfer</ProjectName>
<ProjectGuid>{BC349AD2-94A3-4D99-BFD1-02ED5D3F103E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DirectoryDeltaTransfer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DirectoryDeltaTransfer.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DirectoryDeltaTransferTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DirectoryDeltaTransferTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,325 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2017, 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.
*/
#include "slikenet/GetTime.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/statistics.h"
#include "slikenet/DirectoryDeltaTransfer.h"
#include "slikenet/FileListTransfer.h"
#include <cstdio>
#include <stdlib.h>
#include <limits> // used for std::numeric_limits
#include "slikenet/Kbhit.h"
#include "slikenet/FileList.h"
#include "slikenet/DataCompressor.h"
#include "slikenet/FileListTransferCBInterface.h"
#include "slikenet/sleep.h"
#include "slikenet/IncrementalReadInterface.h"
#include "slikenet/PacketizedTCP.h"
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h> // usleep
#endif
#define USE_TCP
class TestCB : public SLNet::FileListTransferCBInterface
{
public:
bool OnFile(
OnFileStruct *onFileStruct)
{
assert(onFileStruct->byteLengthOfThisFile >= onFileStruct->bytesDownloadedForThisFile);
printf("%i. (100%%) %i/%i %s %ib / %ib\n", onFileStruct->setID, onFileStruct->fileIndex+1, onFileStruct->numberOfFilesInThisSet, onFileStruct->fileName, onFileStruct->byteLengthOfThisFile, onFileStruct->byteLengthOfThisSet);
// Return true to have RakNet delete the memory allocated to hold this file.
// False if you hold onto the memory, and plan to delete it yourself later
return true;
}
virtual void OnFileProgress(FileProgressStruct *fps)
{
assert(fps->onFileStruct->byteLengthOfThisFile >= fps->onFileStruct->bytesDownloadedForThisFile);
printf("%i (%i%%) %i/%i %s %ib / %ib\n", fps->onFileStruct->setID, (int) (100.0*(double)fps->partCount/(double)fps->partTotal),
fps->onFileStruct->fileIndex+1,
fps->onFileStruct->numberOfFilesInThisSet,
fps->onFileStruct->fileName,
fps->onFileStruct->byteLengthOfThisFile,
fps->onFileStruct->byteLengthOfThisSet);
}
virtual bool OnDownloadComplete(DownloadCompleteStruct *dcs)
{
// unused parameters
(void)dcs;
printf("Download complete.\n");
// Returning false automatically deallocates the automatically allocated handler that was created by DirectoryDeltaTransfer
return false;
}
} transferCallback;
int main(void)
{
int ch;
#ifdef USE_TCP
SLNet::PacketizedTCP tcp1;
#else
SLNet::RakPeerInterface *rakPeer;
#endif
// directoryDeltaTransfer is the main plugin that does the work for this sample.
SLNet::DirectoryDeltaTransfer directoryDeltaTransfer;
// The fileListTransfer plugin is used by the DirectoryDeltaTransfer plugin and must also be registered (you could use this yourself too if you wanted, of course).
SLNet::FileListTransfer fileListTransfer;
// Read files in parts, rather than the whole file from disk at once
SLNet::IncrementalReadInterface iri;
directoryDeltaTransfer.SetDownloadRequestIncrementalReadInterface(&iri, 1000000);
#ifdef USE_TCP
tcp1.AttachPlugin(&directoryDeltaTransfer);
tcp1.AttachPlugin(&fileListTransfer);
#else
rakPeer = SLNet::RakPeerInterface::GetInstance();
rakPeer->AttachPlugin(&directoryDeltaTransfer);
rakPeer->AttachPlugin(&fileListTransfer);
// Get download progress notifications. Handled by the plugin.
rakPeer->SetSplitMessageProgressInterval(100);
#endif
directoryDeltaTransfer.SetFileListTransferPlugin(&fileListTransfer);
printf("This sample demonstrates the plugin to incrementally transfer compressed\n");
printf("deltas of directories. In essence, it's a simple autopatcher.\n");
printf("Unlike the full autopatcher, it has no dependencies. It is suitable for\n");
printf("patching from non-dedicated servers at runtime.\n");
printf("Difficulty: Intermediate\n\n");
printf("Enter listen port. Enter for default. If running two instances on the\nsame computer, use 0 for the client.\n");
unsigned short localPort;
char str[256];
Gets(str, sizeof(str));
if (str[0]==0)
localPort=60000;
else {
const int intLocalPort = atoi(str);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 2;
}
localPort = static_cast<unsigned short>(intLocalPort);
}
SLNet::SocketDescriptor socketDescriptor(localPort,0);
#ifdef USE_TCP
SLNET_VERIFY(tcp1.Start(localPort, 8));
#else
if (rakPeer->Startup(8,&socketDescriptor, 1)!= SLNet::RAKNET_STARTED)
{
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
printf("RakNet initialize failed. Possibly duplicate port.\n");
return 1;
}
rakPeer->SetMaximumIncomingConnections(8);
#endif
printf("Commands:\n");
printf("(S)et application directory.\n");
printf("(A)dd allowed uploads from subdirectory.\n");
printf("(D)ownload from subdirectory.\n");
printf("(C)lear allowed uploads.\n");
printf("C(o)nnect to another system.\n");
printf("(Q)uit.\n");
SLNet::SystemAddress sysAddrZero= SLNet::UNASSIGNED_SYSTEM_ADDRESS;
// SLNet::TimeMS nextStatTime = SLNet::GetTimeMS() + 1000;
SLNet::Packet *p;
for(;;)
{
/*
if (//directoryDeltaTransfer.GetNumberOfFilesForUpload()>0 &&
SLNet::GetTimeMS() > nextStatTime)
{
// If sending, periodically show connection stats
char statData[2048];
RakNetStatistics *statistics = rakPeer->GetStatistics(rakPeer->GetSystemAddressFromIndex(0));
// if (statistics->messagesOnResendQueue>0 || statistics->internalOutputQueueSize>0)
if (rakPeer->GetSystemAddressFromIndex(0)!=SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
StatisticsToString(statistics, statData, 2048, 2);
printf("%s\n", statData);
}
nextStatTime=SLNet::GetTimeMS()+5000;
}
*/
// Process packets
#ifdef USE_TCP
p=tcp1.Receive();
#else
p=rakPeer->Receive();
#endif
#ifdef USE_TCP
SLNet::SystemAddress sa;
sa=tcp1.HasNewIncomingConnection();
if (sa!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("ID_NEW_INCOMING_CONNECTION\n");
sysAddrZero=sa;
}
if (tcp1.HasLostConnection()!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_DISCONNECTION_NOTIFICATION\n");
if (tcp1.HasFailedConnectionAttempt()!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("ID_CONNECTION_ATTEMPT_FAILED\n");
sa=tcp1.HasCompletedConnectionAttempt();
if (sa!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
{
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
sysAddrZero=sa;
}
#endif
while (p)
{
#ifdef USE_TCP
tcp1.DeallocatePacket(p);
tcp1.Receive();
#else
if (p->data[0]==ID_NEW_INCOMING_CONNECTION)
{
printf("ID_NEW_INCOMING_CONNECTION\n");
sysAddrZero=p->systemAddress;
}
else if (p->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
{
printf("ID_CONNECTION_REQUEST_ACCEPTED\n");
sysAddrZero=p->systemAddress;
}
else if (p->data[0]==ID_DISCONNECTION_NOTIFICATION)
printf("ID_DISCONNECTION_NOTIFICATION\n");
else if (p->data[0]==ID_CONNECTION_LOST)
printf("ID_CONNECTION_LOST\n");
else if (p->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
printf("ID_CONNECTION_ATTEMPT_FAILED\n");
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
#endif
}
if (_kbhit())
{
ch=_getch();
if (ch=='s')
{
printf("Enter application directory\n");
Gets(str, sizeof(str));
if (str[0]==0)
strcpy_s(str, "C:/Temp");
directoryDeltaTransfer.SetApplicationDirectory(str);
printf("This directory will be prefixed to upload and download subdirectories.\n");
}
else if (ch=='a')
{
printf("Enter uploads subdirectory\n");
Gets(str, sizeof(str));
directoryDeltaTransfer.AddUploadsFromSubdirectory(str);
printf("%i files for upload.\n", directoryDeltaTransfer.GetNumberOfFilesForUpload());
}
else if (ch=='d')
{
char subdir[256];
char outputSubdir[256];
printf("Enter remote subdirectory to download from.\n");
printf("This directory may be any uploaded directory, or a subdir therein.\n");
Gets(subdir,sizeof(subdir));
printf("Enter subdirectory to output to.\n");
Gets(outputSubdir,sizeof(outputSubdir));
unsigned short setId;
setId=directoryDeltaTransfer.DownloadFromSubdirectory(subdir, outputSubdir, true, sysAddrZero, &transferCallback, HIGH_PRIORITY, 0, 0);
if (setId==(unsigned short)-1)
printf("Download failed. Host unreachable.\n");
else
printf("Downloading set %i\n", setId);
}
else if (ch=='c')
{
directoryDeltaTransfer.ClearUploads();
printf("Uploads cleared.\n");
}
else if (ch=='o')
{
char host[256];
printf("Enter host IP: ");
Gets(host,sizeof(host));
if (host[0]==0)
strcpy_s(host, "127.0.0.1");
unsigned short remotePort;
printf("Enter host port: ");
Gets(str, sizeof(str));
if (str[0]==0)
remotePort=60000;
else {
const int intRemotePort = atoi(str);
if ((intRemotePort < 0) || (intRemotePort > std::numeric_limits<unsigned short>::max())) {
printf("Specified remote port %d is outside valid bounds [0, %u]", intRemotePort, std::numeric_limits<unsigned short>::max());
return 3;
}
remotePort = static_cast<unsigned short>(intRemotePort);
}
#ifdef USE_TCP
tcp1.Connect(host,remotePort,false);
#else
rakPeer->Connect(host, remotePort, 0, 0);
#endif
printf("Connecting.\n");
}
else if (ch=='q')
{
printf("Bye!\n");
#ifdef USE_TCP
tcp1.Stop();
#else
rakPeer->Shutdown(1000,0);
#endif
break;
}
}
// Keeps the threads responsive
RakSleep(0);
}
#ifdef USE_TCP
#else
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
#endif
return 0;
}

View File

@ -0,0 +1,15 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(DroppedConnectionTest)
VSUBFOLDER(DroppedConnectionTest "Internal Tests")

View File

@ -0,0 +1,260 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017-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.
*/
#include "slikenet/peerinterface.h"
#include "slikenet/Rand.h" // randomMT
#include "slikenet/MessageIdentifiers.h" // Enumerations
#include "slikenet/types.h" // SystemAddress
#include "slikenet/Kbhit.h"
#include <cstdio>
using namespace SLNet;
#ifdef _WIN32
#include "slikenet/WindowsIncludes.h" // Sleep
#else
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#ifdef _DEBUG
static const short NUMBER_OF_CLIENTS=9;
#else
static const short NUMBER_OF_CLIENTS=100;
#endif
void ShowHelp(void)
{
printf("System started.\n(D)isconnect a random client silently\n(C)onnect a random client\n(R)andom silent disconnects and connects for all clients.\n(N)otify server of random disconnections.\nSpace to verify connection list.\n(H)elp\n(Q)uit\n");
}
int main(void)
{
RakPeerInterface *server;
RakPeerInterface *clients[NUMBER_OF_CLIENTS];
unsigned connectionCount;
int ch;
SystemAddress serverID;
SLNet::Packet *p;
unsigned short numberOfSystems;
int sender;
// Buffer for input (an ugly hack to keep *nix happy)
#ifndef _WIN32
char buff[256];
#endif
printf("This is a project I use internally to test if dropped connections are detected\n");
printf("Difficulty: Intermediate\n\n");
printf("Dropped Connection Test.\n");
unsigned short serverPort = 20000;
server= SLNet::RakPeerInterface::GetInstance();
// server->InitializeSecurity(0,0,0,0);
SLNet::SocketDescriptor socketDescriptor(serverPort,0);
server->Startup(NUMBER_OF_CLIENTS, &socketDescriptor, 1);
server->SetMaximumIncomingConnections(NUMBER_OF_CLIENTS);
server->SetTimeoutTime(10000,UNASSIGNED_SYSTEM_ADDRESS);
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
{
clients[index]= SLNet::RakPeerInterface::GetInstance();
SLNet::SocketDescriptor socketDescriptor2(serverPort+1+index,0);
clients[index]->Startup(1, &socketDescriptor2, 1);
clients[index]->Connect("127.0.0.1", serverPort, 0, 0);
clients[index]->SetTimeoutTime(5000, SLNet::UNASSIGNED_SYSTEM_ADDRESS);
#ifdef _WIN32
Sleep(10);
#else
usleep(10 * 1000);
#endif
printf("%u. ", index);
}
ShowHelp();
for(;;)
{
// User input
if (_kbhit())
{
#ifndef _WIN32
Gets(buff,sizeof(buff));
ch=buff[0];
#else
ch=_getch();
#endif
if (ch=='d' || ch=='D')
{
unsigned short index = randomMT() % NUMBER_OF_CLIENTS;
clients[index]->GetConnectionList(0, &numberOfSystems);
clients[index]->CloseConnection(serverID, false,0);
if (numberOfSystems==0)
printf("Client %u silently closing inactive connection.\n",index);
else
printf("Client %u silently closing active connection.\n",index);
}
else if (ch=='c' || ch=='C')
{
unsigned short index = randomMT() % NUMBER_OF_CLIENTS;
clients[index]->GetConnectionList(0, &numberOfSystems);
clients[index]->Connect("127.0.0.1", serverPort, 0, 0);
if (numberOfSystems==0)
printf("Client %u connecting to same existing connection.\n",index);
else
printf("Client %u connecting to closed connection.\n",index);
}
else if (ch=='r' || ch=='R' || ch=='n' || ch=='N')
{
printf("Randomly connecting and disconnecting each client\n");
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
{
if (NUMBER_OF_CLIENTS==1 || (randomMT()%2)==0)
{
if (clients[index]->IsActive())
{
if (ch=='r' || ch=='R')
clients[index]->CloseConnection(serverID, false, 0);
else
clients[index]->CloseConnection(serverID, true, 0);
}
}
else
{
clients[index]->Connect("127.0.0.1", serverPort, 0, 0);
}
}
}
else if (ch==' ')
{
server->GetConnectionList(0, &numberOfSystems);
printf("The server thinks %i clients are connected.\n", numberOfSystems);
connectionCount=0;
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
{
clients[index]->GetConnectionList(0, &numberOfSystems);
if (numberOfSystems>1)
printf("Bug: Client %u has %i connections\n", index, numberOfSystems);
if (numberOfSystems==1)
{
connectionCount++;
}
}
printf("%u clients are actually connected.\n", connectionCount);
printf("server->NumberOfConnections==%u.\n", server->NumberOfConnections());
}
else if (ch=='h' || ch=='H')
{
ShowHelp();
}
else if (ch=='q' || ch=='Q')
{
break;
}
ch=0;
}
// Parse messages
for(;;)
{
p = server->Receive();
sender=NUMBER_OF_CLIENTS;
if (p==0)
{
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
{
p = clients[index]->Receive();
if (p!=0)
{
sender=index;
break;
}
}
}
if (p)
{
switch (p->data[0])
{
case ID_CONNECTION_REQUEST_ACCEPTED:
printf("%i: ID_CONNECTION_REQUEST_ACCEPTED from %i.\n",sender, p->systemAddress.GetPort());
serverID=p->systemAddress;
break;
case ID_DISCONNECTION_NOTIFICATION:
// Connection lost normally
printf("%i: ID_DISCONNECTION_NOTIFICATION from %i.\n",sender, p->systemAddress.GetPort());
break;
case ID_NEW_INCOMING_CONNECTION:
// Somebody connected. We have their IP now
printf("%i: ID_NEW_INCOMING_CONNECTION from %i.\n",sender, p->systemAddress.GetPort());
break;
case ID_CONNECTION_LOST:
// Couldn't deliver a reliable packet - i.e. the other system was abnormally
// terminated
printf("%i: ID_CONNECTION_LOST from %i.\n",sender, p->systemAddress.GetPort());
break;
case ID_NO_FREE_INCOMING_CONNECTIONS:
printf("%i: ID_NO_FREE_INCOMING_CONNECTIONS from %i.\n",sender, p->systemAddress.GetPort());
break;
default:
// Ignore anything else
break;
}
}
else
break;
if (sender==NUMBER_OF_CLIENTS)
server->DeallocatePacket(p);
else
clients[sender]->DeallocatePacket(p);
}
// 11/29/05 - No longer necessary since I added the keepalive
/*
// Have everyone send a reliable packet so dropped connections are noticed.
ch=255;
server->Send((char*)&ch, 1, HIGH_PRIORITY, RELIABLE, 0, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
clients[index]->Send((char*)&ch, 1, HIGH_PRIORITY, RELIABLE, 0, SLNet::UNASSIGNED_SYSTEM_ADDRESS, true);
*/
// Sleep so this loop doesn't take up all the CPU time
#ifdef _WIN32
Sleep(30);
#else
usleep(30 * 1000);
#endif
}
SLNet::RakPeerInterface::DestroyInstance(server);
for (unsigned short index=0; index < NUMBER_OF_CLIENTS; index++)
SLNet::RakPeerInterface::DestroyInstance(clients[index]);
return 1;
}

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>DroppedConnectionTest</ProjectName>
<ProjectGuid>{1B2F9B70-FFC0-446D-994E-7DC4E874B112}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DroppedConnectionTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DroppedConnectionTest.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DroppedConnectionTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DroppedConnectionTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,14 @@
#
# This file was taken from RakNet 4.082 without any modifications.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
STANDARDSUBPROJECT(${current_folder})

Some files were not shown because too many files have changed in this diff Show More