最近工作中需要用到MySql,以前工作中都用的Oracle,于是今天花了几个小时研究了一下,现在给大家一起分享下,有说得不对的,也请大家指正,这里先谢过了。)安装本想通过非安装版本安装,不过效果不理想,我在官网(www.mysql.com)上下载了非安装版mysql-5.6.24-winx64.zip,解压后设置环境变量,同时也按网上说明的相关操作,在解压后的根目录中配置my.ini文件,再执行相
转载
2024-07-23 08:56:46
39阅读
首先是添加注释的源码: // Use of this source code is governed by a BSD-style license // that can be found in the License file. // // Author: Shuo Chen (chenshuo
原创
2021-03-17 15:58:00
92阅读
首先
原创
2022-09-21 15:42:53
88阅读
总结说的有的过大,算是对自己学习的一个总结。兴许会不断补充。
模型总结
muduo是基于非堵塞的IO和事件驱动的网络库。 muduo的总体结构时one loop per thread+threadpool,图例如以下: mainReactor和subReactor都是EventLoop,在mainReactor中接收连接。把建立后的连接分发到subReactor中。
作者開始在muduo
转载
2017-06-27 10:15:00
278阅读
2评论
muduo的线程模型为one loop per thread+thread pool模型,在前面一篇文章的末尾曾简单的提起过:https://blog..net/qq_41453285/article/details/105104845
原创
2022-01-15 16:50:17
472阅读
muduo的线程模型为one loop per thread+thread pool模型,在前面一篇文章的末尾曾简单的提起过:https://blog.csdn.net/qq_41453285/article/details/105104845 本节以一个Sudoku Solver(数独求解)例子为例,回顾了并发网络服务程序的多种设计方案,并介绍了使用muduo网络库编写多线程服务器的两种最常用手法 在后面“muduo编程示例”相关文章会展现muduo在编写单线程并发网络服务程序方面的能力与便捷性。本文
原创
2021-08-28 15:55:15
538阅读
今天收到一位网友来信:在 simple 中的 daytime 示例中,服务端主动关闭时调用的是如下函数序列,这不是只是关闭了连接上的写操作吗,怎么是关闭了整个连接?
1: void DaytimeServer::onConnection(const muduo::net::TcpConnectionPtr& conn) 2: { 3: if (conn->connec
转载
2017-07-10 15:31:00
104阅读
2评论
channel是muduo中的事件分发器,它只属于一个EventLoop,Channel类中保存着IO事件的类型以及对应的回调函数,每个channel只负责一个文件描述符,但它并不拥有这个文件描述符。channel是在epoll和TcpConnection之间起沟通作用,故也叫做通道,其它类通过调用channel的setCallbcak来和建立channel沟通关系。Chan...
原创
2021-06-01 13:13:38
387阅读
看一下muduo实现的epoll// Copyright 2010, Shuo Chen. All rights reserved.// http://code.google.com/p/muduo///// Use of this source code is governed by a BSD-style license// that can be found...
原创
2021-06-01 13:13:39
222阅读
EventLoop.cc就相当于一个reactor,多线程之间的函数调用(用eventfd唤醒),epoll处理,超时队列处理,对channel的处理。运行loop的进程被称为IO线程,EventLoop提供了一些API确保相应函数在IO线程中调用,确保没有用互斥量保护的变量只能在IO线程中使用,也封装了超时队列的基本操作。EventLoop.h// Copyright...
原创
2021-06-01 13:13:42
332阅读
Atomic是muduo原子操作的实现类。Atomic.h// Use of this source code is governed by a BSD-style license// that can be found in the License file.//// Author: Shuo Chen (chenshuo at chenshuo dot com...
原创
2021-06-01 13:13:58
260阅读
GzipFile封装了gzip的一些API,记录一下// Use of this source code is governed by a BSD-style license// that can be found in the License file.//// Author: Shuo Chen (chenshuo at chenshuo dot com)#pr...
原创
2021-06-01 13:14:05
622阅读
Connector负责主动发起连接,不负责创建socket,只负责连接的建立,外部调用Connector::start就可以发起连接,Connector具有重连的功能和停止连接的功能,连接成功建立后返回到TcpClient。Connector.h// Copyright 2010, Shuo Chen. All rights reserved.// http://...
原创
2021-06-01 13:14:12
437阅读
分为几个模块 EventLoop、TcpServer、Acceptor、TcpConnection、Channel等 对于EventLoop来说: 他仅仅关注里面的主驱动力,EventLoop中仅仅关注poll,这类系统调用使得其成为Reactor模式,EventLoop中有属于这个loop的全部C
转载
2016-03-09 16:38:00
46阅读
muduo网络库源码解析(1):多线程异步日志库(上)muduo网络库源码解析(2):多线程异步日志库(中)muduo网络库源码解析(3):多线程异步日志库(下)muduo网络库源码解析(4):TimerQueue定时机制muduo网络库源码解析(5):EventLoop,Channel与事件分发机制muduo网络库源码解析(6):TcpServer与TcpConnection(上)muduo网络
转载
2023-10-11 21:04:05
52阅读
Acceptor类用于创建套接字,设置套接字选项,调用listen函数,接受连接,然后调用TcpServer的回调。// Copyright 2010, Shuo Chen. All rights reserved.// http://code.google.com/p/muduo///// Use of this source code is governed b...
原创
2021-06-01 13:13:41
253阅读
LogStream.h// Use of this source code is governed by a BSD-style license// that can be found in the License file.//// Author: Shuo Chen (chenshuo at chenshuo dot com)#ifndef MUDUO_BAS...
原创
2021-06-01 13:13:56
395阅读
muduo中的单例模式Singleton.h// Use of this source code is governed by a BSD-style license// that can be found in the License file.//// Author: Shuo Chen (chenshuo at chenshuo dot com)#ifn...
原创
2021-06-01 13:13:59
377阅读
muduo中的线程池。ThreadPool.h// Use of this source code is governed by a BSD-style license// that can be found in the License file.//// Author: Shuo Chen (chenshuo at chenshuo dot com)#if...
原创
2021-06-01 13:14:01
468阅读
EventLoopThreadPool是IO线程对应的线程池,通过调用start函数来new EventLoopThread创建对应的线程和其loop,并将创建的保存在vector中。创建TcpConnection时,就会从EventLoopThreadPool中获取一个IO线程。EventLoopThreadPool.h// Copyright 2010, Shuo...
原创
2021-06-01 13:14:10
499阅读