dotpcap / packetnet

Official repository - High performance .Net assembly for dissecting and constructing network packets such as ethernet, ip, tcp, udp etc.
Mozilla Public License 2.0
469 stars 105 forks source link

Consider converting most classes, especially data packet headers, into structures? #210

Closed sgf closed 1 month ago

sgf commented 1 month ago

This is mainly based on GC and performance considerations.

about bit-field ,there was a source generator support that. https://github.com/barncastle/BitsKit This library is almost the best library for bit-field support so far.

PhyxionNL commented 1 month ago

Most allocations come from the backing byte array, which is something you can largely avoid. Even with gbit saturated both ways you shouldn't have to run into issues.