From 9c83a8975fe93568d4a3c44bd273e846b18d8e3f Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 30 Nov 2010 13:22:29 +0000 Subject: (svn r21357) -Codechange: make it possible to resize the packet's buffer --- src/network/core/packet.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/network/core/packet.h') 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(); -- cgit v1.2.3-54-g00ecf