If I send a packet containing address, port and other stuff, would there be any alignment proble开发者_如何学Cm on the other side? (using socks 5 protocol)
You don't mention which language you're programming in. If you're using C or C++, there are functions like htons
, htonl
, ntohs
, ntohl
and more to standardize network data elements into a transportable format. This guide (among many others) will tell you how to write network portable code so differences in endianness will not bite you in the @ss.
精彩评论