MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HasPacketSizeData

Method HasPacketSizeData

src/network/core/packet.cpp:238–241  ·  view source on GitHub ↗

* Check whether the packet, given the position of the "write" pointer, has read * enough of the packet to contain its size. * @return True iff there is enough data in the packet to contain the packet's size. */

Source from the content-addressed store, hash-verified

236 * @return True iff there is enough data in the packet to contain the packet's size.
237 */
238bool Packet::HasPacketSizeData() const
239{
240 return this->pos >= EncodedLengthOfPacketSize();
241}
242
243/**
244 * Get the number of bytes in the packet.

Callers 1

ReceivePacketMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected