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
482 stars 104 forks source link

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

Closed sgf closed 3 months ago

sgf commented 3 months 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 3 months 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.