commit 52dc832c22d7c97093cd281a9373f49081cfdc07 Author: xX-TheDoctor-Xx Date: Thu Mar 24 21:29:23 2016 +0000 Started VoidNet diff --git a/VoidNet/VoidNet.sln b/VoidNet/VoidNet.sln new file mode 100644 index 0000000..e1a04a4 --- /dev/null +++ b/VoidNet/VoidNet.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoidNet", "VoidNet\VoidNet.vcxproj", "{DC4D9247-92B6-4C52-B47C-41C34CF5D611}" +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 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Debug|x64.ActiveCfg = Debug|x64 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Debug|x64.Build.0 = Debug|x64 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Debug|x86.ActiveCfg = Debug|Win32 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Debug|x86.Build.0 = Debug|Win32 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Release|x64.ActiveCfg = Release|x64 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Release|x64.Build.0 = Release|x64 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Release|x86.ActiveCfg = Release|Win32 + {DC4D9247-92B6-4C52-B47C-41C34CF5D611}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VoidNet/VoidNet/Connection.cpp b/VoidNet/VoidNet/Connection.cpp new file mode 100644 index 0000000..a045fc7 --- /dev/null +++ b/VoidNet/VoidNet/Connection.cpp @@ -0,0 +1,45 @@ +#include "Connection.h" + +VoidNet::Connection::Connection() +{ +} + +VoidNet::Connection::Connection(std::string IPAddress, unsigned int PortNumber) : + IPAddress(IPAddress), PortNumber(PortNumber) +{ +} + +VoidNet::Connection::~Connection() +{ + delete socket; +} + +VoidNet::Connection &VoidNet::Connection::operator=(const Connection &con) +{ + return (VoidNet::Connection)con; + + VoidNet::Connection asd; + VoidNet::Connection dsa; +} + +bool VoidNet::Connection::operator==(Connection &con) +{ + //return socket == con.socket; + return false; +} + +bool VoidNet::Connection::operator!=(Connection &con) +{ + //return socket != con.socket; + return false; +} + +std::string VoidNet::Connection::getIPAddress() +{ + return IPAddress; +} + +unsigned int VoidNet::Connection::getPortNumber() +{ + return PortNumber; +} diff --git a/VoidNet/VoidNet/Connection.h b/VoidNet/VoidNet/Connection.h new file mode 100644 index 0000000..8d743e1 --- /dev/null +++ b/VoidNet/VoidNet/Connection.h @@ -0,0 +1,45 @@ +#pragma once + +#include +#include +#include + +namespace VoidNet +{ + struct Connection + { + // Default constructor + Connection(); + + // Using this constructor will connect automatically + // PortNumber grater than 0 + // IPAddress cant be null + Connection(std::string, unsigned int); + + // Destructor + ~Connection(); + + // Assignment operator + VoidNet::Connection &operator = (const Connection&); + bool operator == (Connection&); + bool operator != (Connection&); + + // this will return the IPAddress of the client connected + std::string getIPAddress(); + + // this will return the Port Number of the client connected + unsigned int getPortNumber(); + + + + private: + // connection socket + SOCKET *socket; + + // client ip address + std::string IPAddress; + + // client port + unsigned int PortNumber; + }; +} \ No newline at end of file diff --git a/VoidNet/VoidNet/Debug/vc140.idb b/VoidNet/VoidNet/Debug/vc140.idb new file mode 100644 index 0000000..3a9d7e7 Binary files /dev/null and b/VoidNet/VoidNet/Debug/vc140.idb differ diff --git a/VoidNet/VoidNet/Enums.h b/VoidNet/VoidNet/Enums.h new file mode 100644 index 0000000..036c641 --- /dev/null +++ b/VoidNet/VoidNet/Enums.h @@ -0,0 +1,10 @@ +#pragma once + +namespace VoidNet +{ + enum Protocol + { + TCP, + UDP + }; +} \ No newline at end of file diff --git a/VoidNet/VoidNet/VoidNet.vcxproj b/VoidNet/VoidNet/VoidNet.vcxproj new file mode 100644 index 0000000..289e838 --- /dev/null +++ b/VoidNet/VoidNet/VoidNet.vcxproj @@ -0,0 +1,122 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {DC4D9247-92B6-4C52-B47C-41C34CF5D611} + VoidNet + 8.1 + + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + + + + + Level3 + Disabled + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/VoidNet/VoidNet/VoidNet.vcxproj.filters b/VoidNet/VoidNet/VoidNet.vcxproj.filters new file mode 100644 index 0000000..b22c1ab --- /dev/null +++ b/VoidNet/VoidNet/VoidNet.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + \ No newline at end of file