diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-22 13:31:13 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-22 13:31:13 +0000 |
commit | bd56bf8afdab16383ed8ad08412a8c807f84af85 (patch) | |
tree | 0e963ada63bcbe3c50dd77986aaa15b9ba49816a /src/net/messageout.h | |
parent | 5359640b6f271af31f6423df9d661433eff89a3e (diff) | |
download | mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.gz mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.bz2 mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.xz mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.zip |
Merged NETWORK branch (includes BEING_OVERHAUL).
Diffstat (limited to 'src/net/messageout.h')
-rw-r--r-- | src/net/messageout.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/net/messageout.h b/src/net/messageout.h index b2ee506e..f6468adb 100644 --- a/src/net/messageout.h +++ b/src/net/messageout.h @@ -27,7 +27,7 @@ #include <iosfwd> #include <SDL_types.h> -class Packet; +class Network; /** * Used for building an outgoing message. @@ -42,12 +42,7 @@ class MessageOut /** * Constructor. */ - MessageOut(); - - /** - * Destructor. - */ - ~MessageOut(); + MessageOut(Network *network); void writeInt8(Sint8 value); /**< Writes a byte. */ void writeInt16(Sint16 value); /**< Writes a short. */ @@ -59,24 +54,9 @@ class MessageOut */ void writeString(const std::string &string, int length = -1); - /** - * Returns an instance of Packet derived from the written data. Use for - * sending the packet. No more writing to the packet may be done after - * a call to this method. - */ - const Packet *getPacket(); - private: - /** - * Expand the packet data to be able to hold more data. - * - * NOTE: For performance enhancements this method could allocate extra - * memory in advance instead of expanding size every time more data is - * added. - */ - void expand(size_t size); + Network *mNetwork; - Packet *mPacket; /**< Created packet. */ char *mData; /**< Data building up. */ unsigned int mDataSize; /**< Size of data. */ unsigned int mPos; /**< Position in the data. */ |