diff --git a/Code/Network/NetworkAPI/Translator.cpp b/Code/Network/NetworkAPI/Translator.cpp index 52b61694..d5e8d0df 100644 --- a/Code/Network/NetworkAPI/Translator.cpp +++ b/Code/Network/NetworkAPI/Translator.cpp @@ -56,7 +56,8 @@ struct Translator::PrivateData auto it = ((MyCastingStruct*)protocol.privateData)->attributes.begin(); auto end = ((MyCastingStruct*)protocol.privateData)->attributes.end(); - size = 4 + 2; //size(int) + number of chars(short) + size = 4; //size(int) + bytes->AddSize(4); message.SetSize(size); //Find all the data types @@ -66,6 +67,7 @@ struct Translator::PrivateData } message.PackShort(size, *bytes); + size += 2; for(int i = 0; i < (int)headerString.size(); i++) { @@ -81,7 +83,7 @@ struct Translator::PrivateData auto it = ((MyCastingStruct*)protocol.privateData)->attributes.begin(); auto end = ((MyCastingStruct*)protocol.privateData)->attributes.end(); - for(int i = 0; i < (int)headerString.size(); i++) + for(int i = 0; i < (int)headerString.size(); i++, it++) { switch((int)headerString.at(i)) { diff --git a/Code/Network/NetworkDependencies/Listener.cpp b/Code/Network/NetworkDependencies/Listener.cpp index b82694d3..4bb22609 100644 --- a/Code/Network/NetworkDependencies/Listener.cpp +++ b/Code/Network/NetworkDependencies/Listener.cpp @@ -17,6 +17,7 @@ Listener::Listener(Oyster::Network::IPostBox* postBox) Listener::~Listener() { + Stop(); if(connection) { delete connection; diff --git a/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj b/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj index bb63d4cf..040b3ff9 100644 --- a/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj +++ b/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj @@ -66,11 +66,11 @@ - $(SolutionDir)..\External\Lib\$(ProjectName)\ + $(SolutionDir)..\Bin\Executable\ $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName)D - C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) - C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath) + $(SolutionDir)..\External\Include\;$(IncludePath);$(IncludePath);C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) + $(OutDir)..\DLL\;$(LibraryPath);$(SolutionDir)..\External\Lib\NetworkAPI;$(SolutionDir)..\Bin\DLL;C:\Program Files (x86)\Visual Leak Detector\lib\Win32 $(SolutionDir)..\External\Lib\$(ProjectName)\ @@ -102,6 +102,9 @@ true + + + NetworkAPI_$(PlatformShortName)D.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -149,6 +152,9 @@ {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} + + {460d625f-2ac9-4559-b809-0ba89ceaedf4} + {c5aa09d0-6594-4cd3-bd92-1d380c7b3b50}