diff --git a/Code/Network/NetworkDependencies/Protocols.h b/Code/Network/NetworkDependencies/Protocols.h index 65beb400..f90d99c6 100644 --- a/Code/Network/NetworkDependencies/Protocols.h +++ b/Code/Network/NetworkDependencies/Protocols.h @@ -27,7 +27,7 @@ namespace Oyster int packageType; int clientID; - ProtocolHeader() { this->packageType = package_type_header; } + ProtocolHeader() { this->packageType = PackageType_header; } virtual ~ProtocolHeader() { } }; @@ -37,7 +37,7 @@ namespace Oyster unsigned int numOfFloats; float *f; - ProtocolTest() { this->packageType = package_type_test; } + ProtocolTest() { this->packageType = PackageType_test; } virtual ~ProtocolTest() { delete[] f; } }; @@ -56,13 +56,13 @@ namespace Oyster { switch(type) { - case package_type_header: + case PackageType_header: if(Protocol.pHeader) { delete Protocol.pHeader; } break; - case package_type_test: + case PackageType_test: if(Protocol.pTest) { delete Protocol.pTest; diff --git a/Code/Network/NetworkDependencies/Translator.cpp b/Code/Network/NetworkDependencies/Translator.cpp index fbd32df0..b0b6d587 100644 --- a/Code/Network/NetworkDependencies/Translator.cpp +++ b/Code/Network/NetworkDependencies/Translator.cpp @@ -10,11 +10,11 @@ void Translator::Pack( ProtocolHeader &header, OysterByte& bytes ) switch(header.packageType) { - case package_type_header: + case PackageType_header: message = new MessageHeader(); break; - case package_type_test: + case PackageType_test: message = new MessageTest(); break; } @@ -41,13 +41,13 @@ ProtocolSet* Translator::Unpack(ProtocolSet* set, OysterByte& bytes ) set->type = (PackageType)header->packageType; switch(set->type) { - case package_type_header: + case PackageType_header: message = new MessageHeader(); set->Protocol.pHeader = new ProtocolHeader; message->Unpack(bytes, *set->Protocol.pHeader); break; - case package_type_test: + case PackageType_test: message = new MessageTest(); set->Protocol.pTest = new ProtocolTest; message->Unpack(bytes, *set->Protocol.pTest); diff --git a/Code/Network/OysterNetworkClient/ClientMain.cpp b/Code/Network/OysterNetworkClient/ClientMain.cpp index 244ce1d4..ce66446f 100644 --- a/Code/Network/OysterNetworkClient/ClientMain.cpp +++ b/Code/Network/OysterNetworkClient/ClientMain.cpp @@ -73,9 +73,9 @@ void chat(Client &client) switch(set->type) { - case package_type_header: + case PackageType_header: break; - case package_type_test: + case PackageType_test: cout <<"Client 2: " << set->Protocol.pTest->textMessage <Protocol.pTest->numOfFloats; i++) {