升压是否必须使用ntohl / htonl / ntohs和/ htons型功能可移植的方法? [英] Does boost have portable way to use ntohl/htonl/ntohs/htons type functions?

查看:253
本文介绍了升压是否必须使用ntohl / htonl / ntohs和/ htons型功能可移植的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我特别升压使用UDP :: ASIO ::知识产权:: UDP套接字::如果插座帮助?

I am using UDP in particular boost::asio::ip::udp::socket sockets if that helps?

什么是头文件是什么?

什么头/班,我需要提振下处理网络字节顺序与UDP?

What headers/classes do I need to handle network byte ordering with the UDP under boost?

推荐答案

刚刚找到它足以的#include<升压/ asio.hpp> ,因为这会提取所有平台相关的报头和可以访问 htonl / ntohl 这正是我需要的。

Just found it is enough to #include <boost/asio.hpp> as this pulls in all the platform dependent headers and gives access to htonl/ntohl which is exactly what I need.

感谢所有的建议。

这篇关于升压是否必须使用ntohl / htonl / ntohs和/ htons型功能可移植的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆