随笔分类 -  muduo源码学习

提供自己学习muduo工程中添加的注释以及测试程序
摘要:首先再GitHub找到muduo,查看clone的链接,使用git命令clone到本地: git clone https://github.com/chenshuo/muduo.git muduo现在有1.0和2.0两个版本可选,1.0版本编译前需要下载boost,2.0不需要 安装boost: y 阅读全文
posted @ 2021-05-10 17:00 荒唐了年少 阅读(1196) 评论(0) 推荐(0)
摘要:注释过的源码太多就不放在这,可以去GitHub查看 下面是测试程序: #include "Exception.h" #include <iostream> class Bar { public: void test() { throw::muduo::Exception("oops"); // 抛出 阅读全文
posted @ 2021-03-18 10:19 荒唐了年少 阅读(82) 评论(0) 推荐(0)
摘要:在写for循环时,可能大家都会想过是写i++还是++i,表面看两者对for循环并没有什么区别,至于用哪一种 可能更多地是看个人的习惯,笔者之前习惯于使用i++,但是最近看到很多示例代码用的都是++i,我就想到 一个问题,两者用在for循环时,真的没有区别吗?于是我做了一个测试,写了两个for循环,每 阅读全文
posted @ 2021-03-18 09:36 荒唐了年少 阅读(294) 评论(0) 推荐(0)
摘要:首先是添加注释的源码: // Use of this source code is governed by a BSD-style license // that can be found in the License file. // // Author: Shuo Chen (chenshuo 阅读全文
posted @ 2021-03-17 15:58 荒唐了年少 阅读(104) 评论(0) 推荐(0)
摘要:首先给出我学习源码时添加的注释: 分别对应Timestamp.h Timestamp.cc文件 // Use of this source code is governed by a BSD-style license // that can be found in the License file 阅读全文
posted @ 2021-03-16 20:20 荒唐了年少 阅读(171) 评论(0) 推荐(0)