Socket programming written in c language. The transmitted data stream is in a customized tlv format. Is it necessary for len to be converted into network byte order?
It is best to convert, so that you will not be outside;
If you suddenly switch big/little-endian after changing the environment, the program will fail;
A clear interface is always good, even if there are mistakes, there are only a few possibilities.