summaryrefslogtreecommitdiff
path: root/src/network/core/packet.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-30 13:22:29 +0000
committerrubidium <rubidium@openttd.org>2010-11-30 13:22:29 +0000
commit9c83a8975fe93568d4a3c44bd273e846b18d8e3f (patch)
treef673aa11b963cb6dce5c08220619b7be3d81b439 /src/network/core/packet.h
parent44937dfa5e9b7942ba46c7b2a0f4414b3dc9f0a9 (diff)
downloadopenttd-9c83a8975fe93568d4a3c44bd273e846b18d8e3f.tar.xz
(svn r21357) -Codechange: make it possible to resize the packet's buffer
Diffstat (limited to 'src/network/core/packet.h')
-rw-r--r--src/network/core/packet.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 38cd528ef..50a3f5cde 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -42,14 +42,17 @@ struct Packet {
PacketSize size;
/** The current read/write position in the packet */
PacketSize pos;
- /** The buffer of this packet */
- byte buffer[SEND_MTU];
+ /** The buffer of this packet, of basically variable length up to SEND_MTU. */
+ byte *buffer;
+
private:
+ /** Socket we're associated with. */
NetworkSocketHandler *cs;
public:
Packet(NetworkSocketHandler *cs);
Packet(PacketType type);
+ ~Packet();
/* Sending/writing of packets */
void PrepareToSend();