随笔分类 -  常用库

常用库demo
摘要:前言 本文使用的asio1.76.0从github获取,老版本中有一个很重要的结构叫做io_service,新版本中改成了io_context,下面主要通过c++14下的一个异步的例子分析boost.asio的线程模型,其代码结构比较复杂,时间有限不能分析的很详细,只是做大体结构分析 正文 asio 阅读全文
posted @ 2021-03-29 18:05 woder 阅读(6771) 评论(0) 推荐(5) 编辑
摘要:#include <iostream> #include <utility> #include <boost/type_index.hpp> using namespace std; using boost::typeindex::type_id_with_cvr; template<typenam 阅读全文
posted @ 2020-10-05 23:02 woder 阅读(755) 评论(0) 推荐(0) 编辑
摘要:概览 1.base64和md5都可以通过apr util库完成 2.base64编码通过apr_base64_encode()实现 3.md5编码通过apr_md5()实现 正文 1.安装apr库 2.base64编码 "apr base64官方文档" 编译 ref "apr base64官方文档" 阅读全文
posted @ 2020-04-20 13:27 woder 阅读(439) 评论(0) 推荐(0) 编辑
摘要:``` #include /* struct timeval { __time_t tv_sec; Seconds. 秒位部分 __suseconds_t tv_usec; Microseconds. 微秒位部分 }; */ void fn(){ struct timeval now; gettimeofday(&now, NULL); //获取从1970年1月1日到现在的时间 cout<<"当前 阅读全文
posted @ 2020-03-27 08:55 woder 阅读(1702) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示