summaryrefslogtreecommitdiff
path: root/src/network/core/packet.h
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-04-18 12:29:34 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-04-24 20:42:01 +0200
commitf71fb0f54af443cee37d3c41a0d4f39a24617741 (patch)
tree5b3f1aeb2f54f72fa29b6ad19f3507c27b6b901c /src/network/core/packet.h
parent6f161f655942f2ca0091a75cdab8e3260e31bb5f (diff)
downloadopenttd-f71fb0f54af443cee37d3c41a0d4f39a24617741.tar.xz
Codechange: encapsulate reading the size of a Packet
Diffstat (limited to 'src/network/core/packet.h')
-rw-r--r--src/network/core/packet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 4eb4703c1..b6a7ff5d3 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -77,6 +77,7 @@ public:
/* Reading/receiving of packets */
bool HasPacketSizeData() const;
bool ParsePacketSize();
+ size_t Size() const;
void PrepareToRead();
bool CanReadFromPacket(size_t bytes_to_read, bool close_connection = false);