Once we allocate a packet, we usually append some free space to be able to fit our data in the packet.
The way we are doing this is by calling packet->alloc. This, however, does not change the packet length property.
So if we call packet->length() we do not observe the new length there. Check here as an example:
|
auto *response = CHECK_NOTNULL(packet_pool_->PacketAlloc()); |
Once we allocate a packet, we usually append some free space to be able to fit our data in the packet.
The way we are doing this is by calling packet->alloc. This, however, does not change the packet length property.
So if we call packet->length() we do not observe the new length there. Check here as an example:
machnet/src/include/machnet_engine.h
Line 928 in 15a937d