上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 55 下一页
摘要: 建造者模式(Builder Pattern)是一种对象构建设计模式,它提供了一种构建对象的最佳方式。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 在建造者模式中,一个导演(Director)负责组织各个部分(Builder)的构建步骤,一个抽象构建器(Abstract Buil 阅读全文
posted @ 2024-02-05 21:19 guanyubo 阅读(21) 评论(0) 推荐(0)
摘要: 目录1 概念2 使用场景2.1 饿汉式单例模式2.2 懒汉式单例模式2.3 双重检查锁定(线程安全) 1 概念 单例模式(Singleton Pattern)是一种常见的设计模式,用于确保一个类只有一个实例,并提供一个全局访问点来获取该实例。在C++中,单例模式通常用于管理全局资源或提供全局配置。 阅读全文
posted @ 2024-02-04 17:14 guanyubo 阅读(60) 评论(0) 推荐(0)
摘要: 目录 阅读全文
posted @ 2024-02-01 22:33 guanyubo 阅读(35) 评论(0) 推荐(0)
摘要: 目录通信流程文件描述符 通信流程 文件描述符 阅读全文
posted @ 2024-01-31 17:57 guanyubo 阅读(28) 评论(0) 推荐(0)
摘要: 目录函数简介低层实现逻辑 函数简介 /* Manipulate an epoll instance "epfd". Returns 0 in case of success, -1 in case of error ( the "errno" variable will contain the sp 阅读全文
posted @ 2024-01-30 18:32 guanyubo 阅读(346) 评论(0) 推荐(0)
摘要: 目录函数简介低层实现逻辑epoll_create与epoll_create1函数的区别 函数简介 /* Creates an epoll instance. Returns an fd for the new instance. The "size" parameter is a hint spec 阅读全文
posted @ 2024-01-30 18:21 guanyubo 阅读(461) 评论(0) 推荐(0)
摘要: 目录函数简介低层实现逻辑 函数简介 /* Wait for events on an epoll instance "epfd". Returns the number of triggered events returned in "events" buffer. Or -1 in case of 阅读全文
posted @ 2024-01-30 18:15 guanyubo 阅读(3520) 评论(0) 推荐(0)
摘要: 原因:缺少libmysqlclient-dev, 安装:apt-get install libmysqlclient-dev 阅读全文
posted @ 2024-01-30 15:25 guanyubo 阅读(52) 评论(0) 推荐(0)
摘要: VS Code中安装插件:Remote-WSL扩展、Remote Development扩展 安装检查:在左下角有一个远程状态的标记 这个标记可以看出vscode在远程还是本地工作。点击后可选择需要的操作。 阅读全文
posted @ 2024-01-30 09:08 guanyubo 阅读(35) 评论(0) 推荐(0)
摘要: 目录定义events字段data字段 定义 epoll_event结构体一般用在epoll机制中,其定义如下: struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data varia 阅读全文
posted @ 2024-01-29 18:39 guanyubo 阅读(409) 评论(0) 推荐(0)
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 55 下一页