Codechange: move logic whether there is enough space in a packet to write data into the Packet
This commit is contained in:
@@ -63,6 +63,7 @@ public:
|
||||
/* Sending/writing of packets */
|
||||
void PrepareToSend();
|
||||
|
||||
bool CanWriteToPacket(size_t bytes_to_write);
|
||||
void Send_bool (bool data);
|
||||
void Send_uint8 (uint8 data);
|
||||
void Send_uint16(uint16 data);
|
||||
@@ -75,7 +76,7 @@ public:
|
||||
bool ParsePacketSize();
|
||||
void PrepareToRead();
|
||||
|
||||
bool CanReadFromPacket (uint bytes_to_read);
|
||||
bool CanReadFromPacket(size_t bytes_to_read, bool close_connection = false);
|
||||
bool Recv_bool ();
|
||||
uint8 Recv_uint8 ();
|
||||
uint16 Recv_uint16();
|
||||
|
Reference in New Issue
Block a user