(svn r21357) -Codechange: make it possible to resize the packet's buffer

This commit is contained in:
rubidium
2010-11-30 13:22:29 +00:00
parent 44937dfa5e
commit 9c83a8975f
4 changed files with 30 additions and 13 deletions

View File

@@ -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();