inetstack icon indicating copy to clipboard operation
inetstack copied to clipboard

[inetstack] TcpSegment struct used for transmit requests expects a payload buffer

Open BrianZill opened this issue 2 years ago • 0 comments

Currently, the TcpSegment structure has a "data" field of type Buffer, which is used to specify the packet payload data to be sent. This field is not optional, so even when sending a header-only packet (e.g. ACKs), an empty buffer has to be created to fill this field.

To avoid extra overhead around creating empty buffers, it would be nice to make this field optional, by changing its type to Option<Buffer>.

BrianZill avatar Aug 25 '22 17:08 BrianZill