Shadowrun: Awakened 29 September 2011 - Build 871
ReplyPacket.h
Go to the documentation of this file.
00001 /*
00002  * ReplyPacket - A general reply packet that is sent from the
00003  *              server to a client. This packet might include an
00004  *              error message.
00005  *
00006  * @Author Michael <Tharbas> Matzen
00007  *
00008  * This program is free software; you can redistribute it and/or modify it
00009  * under the terms of the GNU General Public License as published by the Free
00010  * Software Foundation; either version 2 of the License, or (at your option)
00011  * any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but WITHOUT
00014  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00015  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00016  * more details.
00017  *
00018  * You should have received a copy of the GNU General Public License along with
00019  * this program; if not, write to the Free Software Foundation, Inc., 51
00020  * Franklin St, Fifth Floor, Boston, MA 02110, USA
00021  * 
00022  */
00023 #pragma once
00024 #include "SraPacket.h"
00025 #include "NetworkHelper.h"
00026 #include "SraNetworkShared.h"
00027 
00028 namespace SraNetwork
00029 {
00030 class ReplyPacket :
00031     public SraPacket
00032 {
00033     public:
00034         ReplyPacket(void);
00035         ~ReplyPacket(void);
00036 
00037         virtual void Serialize(RakNet::BitStream* target);
00038         virtual void Deserialize(RakNet::BitStream* source);
00039 
00040         // The reply code, see constants below.
00041         char replyCode;
00042         // The messages opcode that has created this reply.
00043         unsigned char messageOpCode;
00044         // The, optional, response message
00045         RakNet::RakString replyMessage;
00046 
00047         #pragma region Constants
00048         static const int PACKAGE_SIZE =  sizeof(char) + sizeof(int) + sizeof(std::string);
00049 
00050         static const char OK = 0;
00051         static const char FAIL = 1;
00052         #pragma endregion
00053     };
00054 }

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net