摘要: 摘自: https://mmoaay.gitbooks.io/boost-asio-cpp-network-programming-chinese/content/Chapter2.html asio封装了操作系统的select、kqueue、poll/epoll I/O等机制,实现异步IO模型。在 阅读全文
posted @ 2018-08-22 00:26 kilen 阅读(211) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-08-18 23:38 kilen 阅读(20) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-08-18 23:28 kilen 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 C++ map.insert: pair和make_pair区别 2 \*********************************\ 3 map temp; 4 1. temp[1] = "template"; 5 2.temp.insert(pair(1, "template")); 6 3.temp.insert(make_pair(1... 阅读全文
posted @ 2018-06-29 11:28 kilen 阅读(8539) 评论(0) 推荐(0) 编辑
摘要: 一、valgrind 是运行在linux系统下的内存调试工具,支持很多对象:memcheck、addrcheck、cachegrind、Massif、helgrind、Callgrind等。使用valgrind时,必须指明想用的对象,若是省略对象名,默认运行memcheck。(目前只用到memche 阅读全文
posted @ 2018-06-15 23:12 kilen 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 1、centos 6 是iptables, 7 开始就以firewalld代替iptables; 2、systemctl stop firewalld.service 停 systemctl start firewalld.service 开 systemctl enable iptables.se 阅读全文
posted @ 2018-06-02 11:17 kilen 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-04-14 21:18 kilen 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1、gettimeofday() > http://www.linuxidc.com/Linux/2012-06/61903.htm (一般) 阅读全文
posted @ 2017-08-16 11:34 kilen 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1、string转int string str = "1234"; int a; a = stoi(str) > C++11 uint32_t b = stoul(str) > C++11 a = atoi(str.c_str()); { const char *c_str(); c_str()函数 阅读全文
posted @ 2017-07-14 19:59 kilen 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 智能指针:shared_ptr 1、一个局部的shared_ptr 作为返回值过程:当shared_ptr 被创建的时候,自身的引用计数 +1,当前引用计数为 1 , 按值返回以后 引用计数 + 1 (拷贝构造函数,就是可以理解为基础类型的拷贝),当前引用计数为 2 ,函数执行完成之后,申请的sha 阅读全文
posted @ 2017-07-06 22:14 kilen 阅读(4293) 评论(0) 推荐(0) 编辑