Skip to content

Commit

Permalink
Create the VS Project Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
LipkeGu committed Jun 6, 2017
1 parent a5075a2 commit b9dd59f
Show file tree
Hide file tree
Showing 26 changed files with 376 additions and 82 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.sln.docstates

# Build results
[Bb]oot/
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
Expand Down
Binary file added BINL-Server.VC.db
Binary file not shown.
28 changes: 28 additions & 0 deletions BINL-Server.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BINL-Server", "BINL-Server\BINL-Server.vcxproj", "{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Debug|x64.ActiveCfg = Debug|x64
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Debug|x64.Build.0 = Debug|x64
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Debug|x86.ActiveCfg = Debug|Win32
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Debug|x86.Build.0 = Debug|Win32
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Release|x64.ActiveCfg = Release|x64
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Release|x64.Build.0 = Release|x64
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Release|x86.ActiveCfg = Release|Win32
{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
169 changes: 169 additions & 0 deletions BINL-Server/BINL-Server.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BEDEE93F-B92E-4793-8F88-029B05FB4BAF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>BINLServer</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\Client.h" />
<ClInclude Include="src\Connection.h" />
<ClInclude Include="src\Defines.h" />
<ClInclude Include="src\Eventlog.h" />
<ClInclude Include="src\FileSystem.h" />
<ClInclude Include="src\Functions.h" />
<ClInclude Include="src\Includes.h" />
<ClInclude Include="src\Main.h" />
<ClInclude Include="src\Packet.h" />
<ClInclude Include="src\Server.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Client.cpp" />
<ClCompile Include="src\Connection.cpp" />
<ClCompile Include="src\EventLog.cpp" />
<ClCompile Include="src\FileSystem.cpp" />
<ClCompile Include="src\Functions.cpp" />
<ClCompile Include="src\Main.cpp" />
<ClCompile Include="src\Packet.cpp" />
<ClCompile Include="src\Server.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
75 changes: 75 additions & 0 deletions BINL-Server/BINL-Server.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Quelldateien">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headerdateien">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Ressourcendateien">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Client.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Connection.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Defines.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Eventlog.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\FileSystem.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Functions.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Includes.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Main.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Packet.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="src\Server.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Client.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\Connection.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\EventLog.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\FileSystem.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\Functions.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\Main.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\Packet.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="src\Server.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion http/default.css → BINL-Server/http/default.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
body {
body {
background-color: #000000;
color: #ffffff;
}
2 changes: 1 addition & 1 deletion http/index.html → BINL-Server/http/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
Expand Down
52 changes: 27 additions & 25 deletions src/Client.cpp → BINL-Server/src/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ Client::Client(EventLog* pLogger, ServerType type, string id, char* hwaddr)
this->msftwindow = 27182;
#endif
this->block = 0;
this->bytesread = 0;
this->tftp_state = TFTP_HandShake;
this->bytesToRead = 0;
this->blocksize = 1024;
this->windowsize = 1;
this->max_blocksize = 8192;
this->retries = 0;
}
#endif

this->bytesToRead = 0;
this->bytesread = 0;
}

void Client::SetType(ServerType type)
Expand Down Expand Up @@ -282,29 +283,6 @@ void Client::SetMSFTWindow(uint16_t window)
}
#endif

long Client::GetBytesToRead()
{
return this->bytesToRead;
}

void Client::SetBytesToRead(long bytes)
{
this->bytesToRead = bytes;
}

long Client::GetBytesRead()
{
return this->bytesread;
}

void Client::SetBytesRead(long bytes)
{
if (bytes == 0)
this->bytesread = bytes;
else
this->bytesread += bytes;
}

uint16_t Client::GetBlock()
{
return this->block;
Expand All @@ -330,6 +308,30 @@ bool Client::GetACK(Packet* packet)
true : false;
}
#endif

long Client::GetBytesToRead()
{
return this->bytesToRead;
}

void Client::SetBytesToRead(long bytes)
{
this->bytesToRead = bytes;
}

long Client::GetBytesRead()
{
return this->bytesread;
}

void Client::SetBytesRead(long bytes)
{
if (bytes == 0)
this->bytesread = bytes;
else
this->bytesread += bytes;
}

Client::~Client()
{
if (this->s)
Expand Down
Loading

0 comments on commit b9dd59f

Please sign in to comment.