-
Asio:
-
Fixed an incompatibility between
ip::tcp::iostream
and C++11 (#7162). -
Decorated GCC attribute names with underscores to prevent interaction with user-defined macros (#6415).
-
Added missing
#include <cctype>
, needed for some versions of MinGW. -
Changed to use gcc‘s atomic builtins on ARM CPUs, when available (#7140).
-
Changed strand destruction to be a no-op, to allow strand objects to be destroyed after their associated
io_service
has been destroyed. -
Added support for some newer versions of glibc which provide the
epoll_create1()
function but always fail withENOSYS
(#7012). -
Changed the SSL implementation to throw an exception if SSL engine initialisation fails (#6303).
-
Fixed another regression in
buffered_write_stream
(#6310). -
Implemented various minor performance improvements, primarily targeted at Linux x86 and x86-64 platforms.
-
对了,简单介绍一下asio吧,
原文:
Boost.Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
Boost.Asio是一个跨平台的C++语言的网络和低级的I/O编程库,用现代的方法为开发者提供了一个异步模型。(翻译的不是很到位,见谅)
他的核心是boost::asio::io_service,任何一个asio程序都需要一个io_service来run。
大家其实都很清楚,网络通信的瓶颈是在I/O上,也就是I/O读写速度不够快,至少没有CPU快,所以windowsNT上提供了重叠IO的方法,我们叫他IOCP,IOCP只是一个方法而已,大家在windows上的确是将他神话了,至少他的效率不是想象中的那么高,不过处理一般的网络通信够用了。asio其实也是采用了类似的方法,不过实现过程却不相同,具体请查看http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/overview/core/basics.html,它提供了一个io_service来连接你的程序和操作系统。
1.你的程序数据给io_object
2.io_object发送请求给io_service
3.io_service通知操作系统
4.操作系统处理完之后返回给io_service
5.你的应用程序调用io_service::run()来接收操作系统的回馈
6.io_service将结果通知应用程序中的完成句柄
这就是一个简单的asio通信处理的过程,最近我正在学习asio,准备用asio封装一个网络库,同时IOCP也在参考很多游戏源代码中的网络库,不够IOCP得自己写tcp方面的东西,我很不熟悉,所以暂时只能照猫画虎了。最后这两种库都会放出来给大家看的。
PS:最近一段时间挺消极的,不知道为何总是没心思写东西,每天看着群里讨论的热烈程度,也想自己做点东西出来。决定从现在开始正常作息时间,每天晚上写一部分东西,不论多少,至少要写出来。看到的内容需要实践才能出结果,努力吧。