4 ms·
maybe i'm missing something because I don't code network drivers but wouldn't it be something like... if it's little endian (on the wire), the process would be
by pmarreck 2y ago
maybe i'm missing something because I don't code network drivers but wouldn't it be something like...
if it's little endian (on the wire), the process would be like:
(value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24))
and in big endian (again, on the wire, architecture endianness irrelevant) it would be the same thing with the indices reversed, where "value" is the 4 bytes read in off the wire?
- iscoelho 2y agoThe performance would be absolutely horrendous if network drivers were programmed this way. DMA (Direct Memory Access) is all about avoiding deserialization and copies of the data.