boost asio and endian

2019-04-06 19:47发布

问题:

I cant tell, does boost asio handle endian?

回答1:

Asio does convert things like port into network order. The conversion functions are not exposed as part of the official interface and are hidden in the detail namespace instead (e.g. boost::asio::detail::socket_ops::host_to_network_short).



回答2:

boost::asio::socket_'s do not perform any byte order conversion.