├── Makefile ├── README.md ├── client ├── Client.cc ├── Client.exe ├── Log4func.cc ├── Log4func.h ├── Makefile └── client.sh ├── conf └── my.conf ├── image ├── cs-log.png ├── cs-ret.png ├── cs-sequence.mdj ├── cs-sequence.png ├── cs-threadpool-mq.mdj └── cs-uml.png ├── include ├── Configuration.hpp ├── FileName.hpp ├── String2Upper.hpp ├── String2UpperServer.hpp ├── log │ └── Log4func.hpp ├── net │ ├── EpollPoller.hpp │ ├── InetAddress.hpp │ ├── SockIO.hpp │ ├── Socket.hpp │ ├── TcpConnection.hpp │ └── TcpServer.hpp └── threadpool │ ├── Buffer.hpp │ ├── Condition.hpp │ ├── MutexLock.hpp │ ├── Noncopyable.hpp │ ├── Pthread.hpp │ ├── Task.hpp │ └── Threadpool.hpp ├── log └── log4test.log ├── server ├── server.exe └── server.sh └── src ├── Configuration.cpp ├── String2Upper.cpp ├── String2UpperServer.cpp ├── log └── Log4func.cpp ├── main.cpp ├── net ├── EpollPoller.cpp ├── InetAddress.cpp ├── SockIO.cpp ├── Socket.cpp ├── TcpConnection.cpp └── TcpServer.cpp └── threadpool ├── Buffer.cpp ├── Condition.cpp ├── MutexLock.cpp ├── Pthread.cpp └── Threadpool.cpp /Makefile: -------------------------------------------------------------------------------- 1 | INC_DIR:= ./include ./include/threadpool ./include/net ./include/log 2 | SRC_DIR:= ./src/ ./src/threadpool ./src/net ./src/log 3 | 4 | OBJS:= $(wildcard ./src/*.cpp) $(wildcard ./src/net/*.cpp) $(wildcard ./src/threadpool/*.cpp) $(wildcard ./src/log/*.cpp) 5 | INC_FILE:= $(addprefix -I ,$(INC_DIR)) 6 | 7 | CXX:= g++ 8 | CXXFLAGS:= -std=c++11 -g -Wno-deprecated 9 | LIBS:= -llog4cpp -lpthread 10 | RM:= rm -rf 11 | 12 | TARGET:= ./server/server.exe 13 | $(TARGET):$(OBJS) 14 | $(CXX) -o $@ $^ $(CXXFLAGS) $(INC_FILE) $(LIBS) 15 | 16 | clean: 17 | $(RM) $(TARGET) 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## [本文博客链接](https://icoty.github.io/2019/05/25/cs-threadpool-message-queue/) 3 | 4 | 5 | ## 引言 6 | 7 | 并发是什么?企业在进行产品开发过程中为什么需要考虑这个问题?想象一下天猫的双11和京东的618活动,一秒的点击量就有几十万甚至上百万,这么多请求一下子涌入到服务器,服务器需要对这么多的请求逐个进行消化掉,假如服务器一秒的处理能力就几万,那么剩下的不能及时得到处理的这些请求作何处理?总不能让用户界面一直等着,因此消息队列应运而生,所有的请求都统一放入消息队列,工作线程从消息队列不断的消费,消息队列相当于一个缓冲区,可达到解藕、异步和削峰的目的。 8 | 9 | Kafka、ActiveMQ、RabbitMQ和RockerMQ都是消息队列的典型,每一种都有其自身的优势和劣势。本文我用自己编写的Buffer类模拟消息队列,如果是企业级需要上线的应用,一般都是基于业界已有的MQ框架上开发。 10 | 11 | ## 需求原型 12 | 13 | 1. N个Client从标准输入接收数据,然后连续不断的发送到Server端; 14 | 2. Server端接收来自每个Client的数据,将数据中的小写字母全部转换成大写字母,其他字符保持不变,最后把转换结果发送给对应的Client。 15 | 16 | ## 需求分解 17 | 18 | 1. 拿到需求,第一步要做的就是分析需求并选择合适的设计架构,考虑到Server需要和Client进行通信,Client来自四面八方,端对端通信自然选择TCP,因此Server端需要能够监听新的连接请求和已有连接的业务请求; 19 | 2. 又由于Server需要响应多个Client的业务请求,我们希望把业务处理交给Server端的工作线程(消费者)来做; 20 | 3. 同时还需要一个IO线程负责监听Socket描述符,当IO线程监听到已有连接的业务请求时,立即把请求内容封装成一个任务推入消息队列尾; 21 | 4. IO线程与工作线程互斥访问消息队列,当然工作线程消费一个任务或者IO线程添加一个任务都需要通知对方,也就是同步; 22 | 5. 工作线程处理完毕后,把处理结果交给IO线程,由IO线程负责把结果发送给对应的Client,也就是IO线程与工作线程的分离,这里工作线程通知IO线程的方式我用eventfd来实现; 23 | 6. 我们希望引入Log4cpp记录服务端的日志,并能够保存到文件中; 24 | 6. 分析完这些,一个整体架构和大体的样子在脑海中就已经形成了,接着就需要编写设计文档和画流程图、类图和时序图了。 25 | 26 | ## 详细设计文档 27 | 28 | 1. uml静态类图: 29 | ![cmd](image/cs-uml.png) 30 | 31 | 2. uml动态时序图: 32 | ![cmd](image/cs-sequence.png) 33 | 34 | ## 效果 35 | 1. 如图,开了三个Client,运行结果正确: 36 | ![cmd](image/cs-ret.png) 37 | 38 | 2. Server端通过Log4cpp把日志写到文件中: 39 | ![cmd](image/cs-log.png) 40 | 41 | ## 目录结构 42 | 43 | ```bash 44 | . 45 | ├── client // 客户端Demo 46 | │   ├── Client.cc 47 | │   ├── Client.exe 48 | │   ├── client.sh // 进入该目录下启动Client Demo: sh client.sh 49 | │   ├── Log4func.cc // 引入日志模块重新疯转 50 | │   ├── Log4func.h 51 | │   └── Makefile // 编译方式:make 52 | ├── conf 53 | │   └── my.conf // IP,Port配置文件, 从这里进行修改 54 | ├── include // 头文件 55 | │   ├── Configuration.hpp // 配置文件,单例类,my.conf的内存化 56 | │   ├── FileName.hpp // 全局定义,Configuration会用到 57 | │   ├── log // 日志模块头文件 58 | │   │   └── Log4func.hpp 59 | │   ├── net // 网络框架模块头文件 60 | │   │   ├── EpollPoller.hpp 61 | │   │   ├── InetAddress.hpp 62 | │   │   ├── Socket.hpp 63 | │   │   ├── SockIO.hpp 64 | │   │   ├── TcpConnection.hpp 65 | │   │   └── TcpServer.hpp 66 | │   ├── String2Upper.hpp // 工作线程转换成大写实际走的这里面的接口 67 | │   ├── String2UpperServer.hpp // Server端的整个工厂 68 | │   └── threadpool // 线程池、锁、条件变量和消息队列的封装 69 | │   ├── Buffer.hpp 70 | │   ├── Condition.hpp 71 | │   ├── MutexLock.hpp 72 | │   ├── Noncopyable.hpp 73 | │   ├── Pthread.hpp 74 | │   ├── Task.hpp 75 | │   └── Threadpool.hpp 76 | ├── log // Server端的日志通过Log4cpp记录到这个文件中 77 | │   └── log4test.log 78 | ├── Makefile // 编译方式:make 79 | ├── README.md 80 | ├── server // server端Demo 81 | │   ├── server.exe 82 | │   └── server.sh // 进入该目录下启动Server Demo:sh server.sh 83 | └── src // 源文件 84 | ├── Configuration.cpp 85 | ├── log 86 | │   └── Log4func.cpp 87 | ├── main.cpp 88 | ├── net 89 | │   ├── EpollPoller.cpp 90 | │   ├── InetAddress.cpp 91 | │   ├── Socket.cpp 92 | │   ├── SockIO.cpp 93 | │   ├── TcpConnection.cpp 94 | │   └── TcpServer.cpp 95 | ├── String2Upper.cpp 96 | ├── String2UpperServer.cpp 97 | └── threadpool 98 | ├── Buffer.cpp 99 | ├── Condition.cpp 100 | ├── MutexLock.cpp // MutexLockGuard封装 101 | ├── Pthread.cpp 102 | └── Threadpool.cpp 103 | ``` 104 | 105 | ## 参考文献 106 | 107 | [1] UNIX环境高级编程第3版
108 | [2] [cpp reference](https://en.cppreference.com/w/)
109 | [3] [UML时序图](https://www.cnblogs.com/downey/p/4890830.html)
110 | [4] [Log4cpp官网下载](https://sourceforge.net/projects/log4cpp/)
111 | [5] [Log4cpp安装](https://blog.csdn.net/sinat_26003209/article/details/46522953)
112 | -------------------------------------------------------------------------------- /client/Client.cc: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Client.cc 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | using std::string; 19 | using std::cout; 20 | using std::endl; 21 | #define ERR_EXIT(m) \ 22 | do { \ 23 | perror(m);\ 24 | exit(EXIT_FAILURE);\ 25 | }while(0) 26 | 27 | void do_service(int sockfd); 28 | 29 | int main(int argc, const char *argv[]) 30 | { 31 | if(argc!=2){ 32 | LogError("input my.conf path!"); 33 | return -1; 34 | } 35 | char tmp[10]={0}; 36 | char ip[16]={0}; 37 | int port; 38 | FILE *fp=fopen(argv[1],"rb"); 39 | if(NULL==fp){ 40 | LogError("fopen error!"); 41 | } 42 | fscanf(fp,"%s%s",tmp,ip); 43 | fscanf(fp,"%s%d",tmp,&port); 44 | fclose(fp); 45 | int peerfd = socket(PF_INET, SOCK_STREAM, 0); 46 | if(peerfd == -1) 47 | ERR_EXIT("socket"); 48 | 49 | struct sockaddr_in addr; 50 | memset(&addr, 0, sizeof addr); 51 | addr.sin_family = AF_INET; 52 | addr.sin_addr.s_addr = inet_addr(ip); //localhost 53 | addr.sin_port = htons(port); 54 | socklen_t len = sizeof addr; 55 | if(connect(peerfd, (struct sockaddr*)&addr, len) == -1) 56 | ERR_EXIT("Connect"); 57 | #if 0 58 | int peerfd = socket(PF_INET, SOCK_STREAM, 0); 59 | if(peerfd == -1) 60 | ERR_EXIT("socket"); 61 | Socket client(peerfd); 62 | #endif 63 | do_service(peerfd); 64 | return 0; 65 | } 66 | 67 | void do_service(int sockfd) 68 | { 69 | char recvbuf[1<<12] = {0}; // 4k 70 | char sendbuf[1<<12] = {0}; 71 | while(1) 72 | { 73 | memset(recvbuf, 0, sizeof recvbuf); 74 | 75 | int nread = read(sockfd, recvbuf, sizeof recvbuf); 76 | if(nread == -1) 77 | { 78 | if(errno == EINTR) 79 | continue; 80 | ERR_EXIT("read"); 81 | }else if(nread == 0){ 82 | LogError("server close!"); 83 | close(sockfd); 84 | exit(EXIT_SUCCESS); 85 | } 86 | LogInfo(" receve message = " + string(recvbuf) + " "); 87 | printf("\n"); 88 | memset(sendbuf, 0, sizeof sendbuf); 89 | fgets(sendbuf, sizeof sendbuf, stdin); 90 | write(sockfd, sendbuf, strlen(sendbuf)); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /client/Client.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/client/Client.exe -------------------------------------------------------------------------------- /client/Log4func.cc: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Log4func.cc 3 | /// @author https://icoty.github.io 4 | /// 5 | 6 | #include "Log4func.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | Mylog * Mylog::_pInstance=NULL; 13 | 14 | Mylog * Mylog::getInstance() 15 | { 16 | if(NULL==_pInstance) 17 | { 18 | _pInstance = new Mylog; 19 | } 20 | return _pInstance; 21 | } 22 | 23 | void Mylog::destroy() 24 | { 25 | if(_pInstance){ 26 | Category::shutdown(); 27 | delete _pInstance; 28 | } 29 | } 30 | 31 | Mylog::Mylog() 32 | :_cat(Category::getRoot().getInstance("mycat")) 33 | { 34 | PatternLayout *ptn1=new PatternLayout(); 35 | ptn1->setConversionPattern("%d:%c %p %x:%m%n"); 36 | PatternLayout *ptn2=new PatternLayout(); 37 | ptn2->setConversionPattern("%d:%c %p %x:%m%n"); 38 | 39 | OstreamAppender *osApp=new OstreamAppender("osApp",&cout); 40 | osApp->setLayout(ptn1); 41 | 42 | FileAppender *fileApp=new FileAppender("fileApp","./Log/log4test.log"); 43 | fileApp->setLayout(ptn2); 44 | 45 | _cat.addAppender(osApp); 46 | _cat.addAppender(fileApp); 47 | 48 | _cat.setPriority(Priority::DEBUG); 49 | } 50 | 51 | Mylog::~Mylog() 52 | {} 53 | 54 | void Mylog::warn(const string & msg) 55 | { 56 | _cat.warn(msg.c_str());//c++11切换至c标准 57 | } 58 | 59 | 60 | void Mylog::debug(const string & msg) 61 | { 62 | _cat.debug(msg.c_str()); 63 | } 64 | 65 | 66 | void Mylog::info(const string & msg) 67 | { 68 | _cat.info(msg.c_str()); 69 | } 70 | 71 | 72 | void Mylog::error(const string & msg) 73 | { 74 | _cat.error(msg.c_str()); 75 | } 76 | 77 | -------------------------------------------------------------------------------- /client/Log4func.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Log4func.h 3 | /// @author https://icoty.github.io 4 | /// 5 | 6 | #ifndef __LOG4FUN_H__ 7 | #define __LOG4FUN_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | using std::cout; 14 | using std::endl; 15 | using std::string; 16 | using namespace log4cpp; 17 | 18 | class Mylog{ 19 | public: 20 | static Mylog * getInstance(); 21 | static void destroy(); 22 | 23 | void warn(const string & msg); 24 | void error(const string & msg); 25 | void info(const string & msg); 26 | void debug(const string & msg); 27 | private: 28 | Mylog(); 29 | ~Mylog(); 30 | private: 31 | static Mylog * _pInstance; 32 | Category &_cat; 33 | }; 34 | 35 | inline string int2str(int num){ 36 | std::ostringstream oss; 37 | oss << num; 38 | return oss.str(); 39 | } 40 | 41 | #define postfix(msg) \ 42 | string(msg).append("[").append(__FILE__)\ 43 | .append(":").append(__FUNCTION__)\ 44 | .append(":").append(int2str(__LINE__)).append("]") 45 | 46 | inline void logWarn(const string & msg){ 47 | Mylog * plog = Mylog::getInstance(); 48 | plog->warn(msg); 49 | } 50 | 51 | inline void logInfo(const string & msg){ 52 | Mylog * plog = Mylog::getInstance(); 53 | plog->info(msg); 54 | } 55 | 56 | inline void logDebug(const string & msg){ 57 | Mylog * plog = Mylog::getInstance(); 58 | plog->debug(msg); 59 | } 60 | 61 | inline void logError(const string & msg){ 62 | Mylog * plog = Mylog::getInstance(); 63 | plog->error(msg); 64 | } 65 | 66 | #define LogWarn(msg) logWarn(postfix(msg)) 67 | #define LogError(msg) logError(postfix(msg)) 68 | #define LogInfo(msg) logInfo(postfix(msg)) 69 | #define LogDebug(msg) logDebug(postfix(msg)) 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /client/Makefile: -------------------------------------------------------------------------------- 1 | OBJS: 2 | g++ Client.cc Log4func.cc -o Client.exe -llog4cpp -lpthread 3 | clean: 4 | rm -rf Client.exe 5 | -------------------------------------------------------------------------------- /client/client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./Client.exe ../conf/my.conf 3 | -------------------------------------------------------------------------------- /conf/my.conf: -------------------------------------------------------------------------------- 1 | ip 127.0.0.1 2 | port 9999 3 | -------------------------------------------------------------------------------- /image/cs-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/image/cs-log.png -------------------------------------------------------------------------------- /image/cs-ret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/image/cs-ret.png -------------------------------------------------------------------------------- /image/cs-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/image/cs-sequence.png -------------------------------------------------------------------------------- /image/cs-uml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/image/cs-uml.png -------------------------------------------------------------------------------- /include/Configuration.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Configuration.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | 6 | #ifndef __YANGYU_CONFIGURATION_H__ 7 | #define __YANGYU_CONFIGURATION_H__ 8 | 9 | #include "FileName.hpp" 10 | #include 11 | #include 12 | #include 13 | #include 14 | using std::map; 15 | using std::set; 16 | using std::string; 17 | 18 | namespace yangyu 19 | { 20 | 21 | class Configuration{ 22 | public: 23 | Configuration(const string& filepath); 24 | void init(); 25 | map & getConfigMap(); 26 | void debug(); 27 | private: 28 | string _filepath; 29 | map _configMap; 30 | }; 31 | 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /include/FileName.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file FileName.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_FILENAME_H__ 6 | #define __YANGYU_FILENAME_H__ 7 | 8 | #include 9 | using std::string; 10 | static const string IP="ip"; 11 | static const string PORT="port"; 12 | #endif 13 | -------------------------------------------------------------------------------- /include/String2Upper.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file String2Upper.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_WORDQUERY_H__ 6 | #define __YANGYU_WORDQUERY_H__ 7 | 8 | #include "Configuration.hpp" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | using std::vector; 16 | using std::string; 17 | using std::map; 18 | using std::pair; 19 | using std::set; 20 | using std::unordered_map; 21 | //using namespace std::tr1; 22 | 23 | namespace yangyu 24 | { 25 | 26 | class String2Upper{ 27 | public: 28 | String2Upper(Configuration & conf); 29 | 30 | string doQuery(const string & word); 31 | private: 32 | Configuration & _conf; 33 | }; 34 | 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /include/String2UpperServer.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file String2UpperServer.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_WORDQUERYSERVER_H__ 6 | #define __YANGYU_WORDQUERYSERVER_H__ 7 | 8 | #include "TcpServer.hpp" 9 | #include "Threadpool.hpp" 10 | #include "TcpConnection.hpp" 11 | #include "Configuration.hpp" 12 | #include "String2Upper.hpp" 13 | #include 14 | 15 | namespace yangyu 16 | { 17 | 18 | class String2UpperServer 19 | :public std::enable_shared_from_this 20 | { 21 | public: 22 | String2UpperServer(const string &cfgFileName); 23 | void start(); 24 | void onConnection(TcpConnectionPtr conn); 25 | void onMessage(TcpConnectionPtr conn); 26 | void onClose(TcpConnectionPtr conn); 27 | void doQuery(TcpConnectionPtr & conn,const string & query); 28 | private: 29 | Configuration _conf; 30 | String2Upper _wordquery; 31 | Threadpool _threadpool; 32 | TcpServer _tcpserver; 33 | }; 34 | 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /include/log/Log4func.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Log4func.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | 6 | #ifndef __LOG4FUN_H__ 7 | #define __LOG4FUN_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | using std::cout; 14 | using std::endl; 15 | using std::string; 16 | using namespace log4cpp; 17 | 18 | class Mylog{ 19 | public: 20 | static Mylog * getInstance(); 21 | static void destroy(); 22 | 23 | void warn(const string & msg); 24 | void error(const string & msg); 25 | void info(const string & msg); 26 | void debug(const string & msg); 27 | private: 28 | Mylog(); 29 | ~Mylog(); 30 | private: 31 | static Mylog * _pInstance; 32 | Category &_cat; 33 | }; 34 | 35 | inline string int2str(int num){ 36 | std::ostringstream oss; 37 | oss << num; 38 | return oss.str(); 39 | } 40 | 41 | #define postfix(msg) \ 42 | string(msg).append("[").append(__FILE__)\ 43 | .append(":").append(__FUNCTION__)\ 44 | .append(":").append(int2str(__LINE__)).append("]") 45 | 46 | inline void logWarn(const string & msg){ 47 | Mylog * plog = Mylog::getInstance(); 48 | plog->warn(msg); 49 | } 50 | 51 | inline void logInfo(const string & msg){ 52 | Mylog * plog = Mylog::getInstance(); 53 | plog->info(msg); 54 | } 55 | 56 | inline void logDebug(const string & msg){ 57 | Mylog * plog = Mylog::getInstance(); 58 | plog->debug(msg); 59 | } 60 | 61 | inline void logError(const string & msg){ 62 | Mylog * plog = Mylog::getInstance(); 63 | plog->error(msg); 64 | } 65 | 66 | #define LogWarn(msg) logWarn(postfix(msg)) 67 | #define LogError(msg) logError(postfix(msg)) 68 | #define LogInfo(msg) logInfo(postfix(msg)) 69 | #define LogDebug(msg) logDebug(postfix(msg)) 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /include/net/EpollPoller.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file EpollPoller.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_EPOLLPOLLER_H__ 6 | #define __YANGYU_EPOLLPOLLER_H__ 7 | #include "Noncopyable.hpp" 8 | #include "MutexLock.hpp" 9 | #include "TcpConnection.hpp" 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace yangyu 16 | { 17 | 18 | class EpollPoller : Noncopyable{ 19 | public: 20 | typedef TcpConnection::TcpConnectionCallback EpollCallback; 21 | typedef std::function Function; 22 | 23 | explicit EpollPoller(int listenfd); 24 | ~EpollPoller(); 25 | void loop(); //启动epoll 26 | void unloop(); //关闭epoll 27 | void setConnectCallback(EpollCallback cb) 28 | { _onConnectCallback = std::move(cb); } 29 | void setMessageCallback(EpollCallback cb) 30 | { _onMessageCallback = std::move(cb); } 31 | void setCloseCallback(EpollCallback cb) 32 | { _onCloseCallback = std::move(cb); } 33 | 34 | void runInLoop(Function cb); 35 | 36 | private: 37 | void waitEpollFd(); //循环 38 | void handleConnection(); //处理accept 39 | void handleMessage(int peerfd); //处理msg 40 | 41 | void handleRead();//处理_eventfd 42 | void wakeup();//激活_enentfd 43 | void doPendingFunctors();//_eventfd被激活之后,执行回调函数 44 | 45 | private: 46 | const int _epollfd; 47 | const int _listenfd; 48 | const int _eventfd; 49 | bool _isLooping; //是否在运行 50 | 51 | MutexLock _mutex; 52 | std::vector _pendingFunctors; 53 | 54 | typedef std::vector EventList; 55 | EventList _events; //保存活跃的fd 56 | typedef std::map ConnectionList;//保存连接的sfd和tcpconnection对 57 | ConnectionList _lists; //实现fd到conn的映射 58 | EpollCallback _onConnectCallback; 59 | EpollCallback _onMessageCallback; 60 | EpollCallback _onCloseCallback; 61 | }; 62 | 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /include/net/InetAddress.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file InetAddress.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_INETADDRESS_H__ 6 | #define __YANGYU_INETADDRESS_H__ 7 | 8 | #include 9 | #include 10 | using std::string; 11 | 12 | namespace yangyu 13 | { 14 | 15 | class InetAddress{ 16 | public: 17 | explicit InetAddress(unsigned short port); 18 | InetAddress(const string &ip, unsigned short port); 19 | InetAddress(const struct sockaddr_in &addr); 20 | 21 | void setSockAddrInet(const struct sockaddr_in &addr); 22 | const struct sockaddr_in *getSockAddrInet()const; 23 | string toIp()const; 24 | unsigned short toPort()const; 25 | private: 26 | struct sockaddr_in _addr; 27 | }; 28 | 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /include/net/SockIO.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file SockIO.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_SOCKETIO_H__ 6 | #define __YANGYU_SOCKETIO_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include 10 | 11 | namespace yangyu 12 | { 13 | 14 | class SocketIO : Noncopyable{ 15 | public: 16 | explicit SocketIO(int sockfd) 17 | : _sockfd(sockfd) 18 | { } 19 | 20 | ssize_t readn(char *buf, size_t count); 21 | ssize_t writen(const char *buf, size_t count); 22 | ssize_t readline(char *usrbuf, size_t maxlen); 23 | private: 24 | ssize_t recv_peek(char *buf, size_t len);//?? 25 | const int _sockfd; 26 | }; 27 | 28 | } 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /include/net/Socket.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Socket.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_SOCKET_H__ 6 | #define __YANGYU_SOCKET_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include "InetAddress.hpp" 10 | 11 | namespace yangyu 12 | { 13 | 14 | typedef struct sockaddr SA; 15 | 16 | class Socket:Noncopyable{ 17 | public: 18 | explicit Socket(int sockfd); 19 | ~Socket(); 20 | 21 | //TcpServer类于main.cc中完成此部分工作 22 | //void ready(const InetAddress &); 23 | int fd()const; 24 | void bindAddress(const InetAddress &addr); 25 | void listen(); 26 | int accept(); 27 | 28 | void shutdownWrite(); 29 | 30 | void setTcpNoDelay(bool on); 31 | void setReusePort(bool on); 32 | void setReuseAddr(bool on); 33 | void setKeepAlive(bool on); 34 | 35 | static InetAddress getLocalAddr(int sockfd); 36 | static InetAddress getPeerAddr(int sockfd); 37 | private: 38 | const int _sockfd; 39 | }; 40 | 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /include/net/TcpConnection.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file TcpConnection.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_TCPCONNECTION_H__ 6 | #define __YANGYU_TCPCONNECTION_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include "Socket.hpp" 10 | #include "SockIO.hpp" 11 | #include 12 | #include 13 | 14 | namespace yangyu 15 | { 16 | 17 | class EpollPoller; 18 | 19 | class TcpConnection; 20 | typedef std::shared_ptr TcpConnectionPtr; 21 | 22 | class TcpConnection 23 | :private Noncopyable 24 | ,public std::enable_shared_from_this 25 | { 26 | public: 27 | typedef std::function TcpConnectionCallback; 28 | 29 | explicit TcpConnection(int sockfd,EpollPoller *p); 30 | ~TcpConnection(); 31 | 32 | //C++11 move semantics 33 | void setConnectCallback(TcpConnectionCallback cb) 34 | { onConnectCallback_ = std::move(cb); } 35 | void setMessageCallback(TcpConnectionCallback cb) 36 | { onMessageCallback_ = std::move(cb); } 37 | void setCloseCallback(TcpConnectionCallback cb) 38 | { onCloseCallback_ = std::move(cb); } 39 | 40 | void handleConnectCallback(); 41 | void handleMessageCallback(); 42 | void handleCloseCallback(); 43 | 44 | void shutdown() 45 | { _sockfd.shutdownWrite(); _isShutdownWrite = true; } 46 | 47 | ssize_t readn(char *buf, size_t count); 48 | ssize_t writen(const char *buf, size_t count); 49 | ssize_t readLine(char *usrbuf, size_t maxlen); 50 | 51 | std::string receive(); 52 | void send(const std::string &s); 53 | 54 | void sendInLoop(const std::string &s); 55 | 56 | const InetAddress &getLocalAddr() const 57 | { return _localAddr; } 58 | const InetAddress &getPeerAddr() const 59 | { return _peerAddr; } 60 | 61 | std::string toString() const; 62 | 63 | private: 64 | Socket _sockfd; 65 | SocketIO _sockIO; 66 | const InetAddress _localAddr; 67 | const InetAddress _peerAddr; 68 | bool _isShutdownWrite; //是否关闭写端 69 | 70 | EpollPoller *_epollPoller; 71 | 72 | TcpConnectionCallback onConnectCallback_; 73 | TcpConnectionCallback onMessageCallback_; 74 | TcpConnectionCallback onCloseCallback_; 75 | }; 76 | 77 | } 78 | #endif 79 | -------------------------------------------------------------------------------- /include/net/TcpServer.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file TcpSever.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_TCPSERVER_H__ 6 | #define __YANGYU_TCPSERVER_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include "EpollPoller.hpp" 10 | #include "Socket.hpp" 11 | #include "InetAddress.hpp" 12 | #include 13 | using std::string; 14 | 15 | namespace yangyu 16 | { 17 | 18 | class TcpServer : Noncopyable 19 | { 20 | public: 21 | typedef EpollPoller::EpollCallback TcpServerCallback; 22 | 23 | TcpServer(const string & ip, unsigned short port); 24 | 25 | void start() 26 | { _poller.loop(); } 27 | 28 | void setConnectCallback(TcpServerCallback cb) 29 | { _poller.setConnectCallback(std::move(cb)); } 30 | void setMessageCallback(TcpServerCallback cb) 31 | { _poller.setMessageCallback(std::move(cb)); } 32 | void setCloseCallback(TcpServerCallback cb) 33 | { _poller.setCloseCallback(std::move(cb)); } 34 | 35 | private: 36 | InetAddress _addr; 37 | Socket _sockfd; 38 | EpollPoller _poller; 39 | }; 40 | 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /include/threadpool/Buffer.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Buffer.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_BUFFER_H__ 6 | #define __YANGYU_BUFFER_H__ 7 | 8 | #include "MutexLock.hpp" 9 | #include "Condition.hpp" 10 | 11 | #include 12 | #include 13 | 14 | namespace yangyu 15 | { 16 | 17 | typedef std::function ElemType; 18 | 19 | class Buffer{ 20 | public: 21 | Buffer(size_t size); 22 | void push(ElemType elem); 23 | ElemType pop(); 24 | bool empty(); 25 | bool full(); 26 | void wakeup(); 27 | private: 28 | MutexLock _mutex; 29 | Condition _notFull; 30 | Condition _notEmpty; 31 | size_t _size; 32 | bool _flag; 33 | std::queue _que; 34 | }; 35 | 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /include/threadpool/Condition.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Condition.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef _WD_CONDITION_H__ 6 | #define _WD_CONDITION_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include 10 | 11 | namespace yangyu 12 | { 13 | 14 | class MutexLock;//前向声明 15 | 16 | class Condition:private Noncopyable{ 17 | public: 18 | Condition(MutexLock &mutex); 19 | ~Condition(); 20 | void wait(); 21 | void notify(); 22 | void notifyall(); 23 | 24 | private: 25 | pthread_cond_t _cond; 26 | MutexLock & _mutex; 27 | }; 28 | 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /include/threadpool/MutexLock.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file MutexLock.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_MUTEXLOCK_H__ 6 | #define __YANGYU_MUTEXLOCK_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | #include 10 | 11 | namespace yangyu 12 | { 13 | 14 | class MutexLock{ 15 | public: 16 | MutexLock(); 17 | ~MutexLock(); 18 | void lock(); 19 | void unlock(); 20 | bool status()const; 21 | pthread_mutex_t * getMutexLockPtr(); 22 | private: 23 | MutexLock(const MutexLock&); 24 | MutexLock& operator=(const MutexLock&); 25 | private: 26 | bool _islocking; 27 | pthread_mutex_t _mutex; 28 | }; 29 | 30 | class MutexLockGuard{ 31 | public: 32 | MutexLockGuard(MutexLock &mutex) 33 | :_mutex(mutex) 34 | { 35 | _mutex.lock(); 36 | } 37 | 38 | ~MutexLockGuard() 39 | { 40 | _mutex.unlock(); 41 | } 42 | private: 43 | MutexLock &_mutex; 44 | }; 45 | 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /include/threadpool/Noncopyable.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Noncopyable.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_NONCOPYABLE_H__ 6 | #define __YANGYU_NONCOPYABLE_H__ 7 | 8 | namespace yangyu 9 | { 10 | 11 | class Noncopyable{ 12 | protected: 13 | Noncopyable(){ } 14 | ~Noncopyable(){ } 15 | private: 16 | Noncopyable(const Noncopyable &); 17 | Noncopyable & operator=(const Noncopyable &); 18 | }; 19 | 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /include/threadpool/Pthread.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Pthread.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_PTHREAD_H__ 6 | #define __YANGYU_PTHREAD_H__ 7 | 8 | #include "Noncopyable.hpp" 9 | 10 | #include 11 | #include 12 | using std::function; 13 | 14 | namespace yangyu 15 | { 16 | //private Noncopyable 实现继承 17 | //public Noncopyable 接口继承 18 | class Thread:private Noncopyable{ 19 | typedef function ThreadCallback; 20 | public: 21 | Thread(ThreadCallback cb); 22 | ~Thread(); 23 | void start(); 24 | void join(); 25 | static void *threadFunc(void *arg); 26 | pthread_t getId(); 27 | 28 | private: 29 | pthread_t _pthId; //oo_thread 30 | bool _isRunning; 31 | ThreadCallback _cb; 32 | }; 33 | 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /include/threadpool/Task.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Task.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #if 0 6 | 7 | #ifndef __YANGYU_TASK_H__ 8 | #define __YANGYU_TASK_H__ 9 | 10 | namespace yangyu 11 | { 12 | 13 | class Task{ 14 | public: 15 | virtual void execute()=0; 16 | }; 17 | 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /include/threadpool/Threadpool.hpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Threadpool.hpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #ifndef __YANGYU_THREADPOOL_H__ 6 | #define __YANGYU_THREADPOOL_H__ 7 | #include "Buffer.hpp" 8 | #include "Pthread.hpp" 9 | #include 10 | #include 11 | #include 12 | #include 13 | using std::vector; 14 | using std::shared_ptr; 15 | using std::cout; 16 | using std::endl; 17 | 18 | namespace yangyu 19 | { 20 | 21 | class Thread; 22 | 23 | typedef std::function Task; 24 | 25 | class Threadpool{ 26 | public: 27 | Threadpool(size_t threadNum,size_t bufSize); 28 | ~Threadpool(); 29 | void start(); 30 | void stop(); 31 | void addTask(Task task); 32 | 33 | private: 34 | Task getTask(); 35 | void processTask(); 36 | private: 37 | bool _isExit; 38 | size_t _threadNum; 39 | size_t _bufSize; 40 | Buffer _buff; 41 | vector> _threads; 42 | }; 43 | 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /log/log4test.log: -------------------------------------------------------------------------------- 1 | 2 | 2019-05-25 14:08:03,460:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 3 | 2019-05-25 14:08:15,164:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 4 | 2019-05-25 14:08:20,169:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 5 | 2019-05-25 14:08:25,175:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 6 | 2019-05-25 14:08:30,181:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 7 | 2019-05-25 14:08:35,187:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 8 | 2019-05-25 14:08:40,193:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 9 | 2019-05-25 14:08:45,199:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 10 | 2019-05-25 14:08:50,206:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 11 | 2019-05-25 14:08:55,213:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 12 | 2019-05-25 14:09:00,218:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 13 | 2019-05-25 14:09:05,225:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 14 | 2019-05-25 14:09:10,232:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 15 | 2019-05-25 14:09:15,239:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 16 | 2019-05-25 14:09:20,246:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 17 | 2019-05-25 14:09:25,253:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 18 | 2019-05-25 14:09:30,259:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 19 | 2019-05-25 14:09:35,266:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 20 | 2019-05-25 14:09:40,274:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 21 | 2019-05-25 14:09:45,280:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 22 | 2019-05-25 14:09:50,286:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 23 | 2019-05-25 14:09:55,293:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 24 | 2019-05-25 14:10:00,298:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 25 | 2019-05-25 14:10:05,304:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 26 | 2019-05-25 14:10:10,312:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 27 | 2019-05-25 14:10:15,317:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 28 | 2019-05-25 14:10:20,323:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 29 | 2019-05-25 14:10:25,332:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 30 | 2019-05-25 14:10:30,338:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 31 | 2019-05-25 14:10:35,347:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 32 | 2019-05-25 14:10:40,358:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 33 | 2019-05-25 14:10:45,368:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 34 | 2019-05-25 14:10:50,374:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 35 | 2019-05-25 14:10:55,377:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 36 | 2019-05-25 14:11:00,383:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 37 | 2019-05-25 14:11:05,390:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 38 | 2019-05-25 14:11:10,397:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 39 | 2019-05-25 14:11:15,403:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 40 | 2019-05-25 14:11:20,409:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 41 | 2019-05-25 14:11:25,416:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 42 | 2019-05-25 14:11:30,423:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 43 | 2019-05-25 14:11:35,428:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 44 | 2019-05-25 14:11:40,433:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 45 | 2019-05-25 14:11:45,439:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 46 | 2019-05-25 14:11:50,445:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 47 | 2019-05-25 14:11:55,452:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 48 | 2019-05-25 14:12:00,459:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 49 | 2019-05-25 14:12:05,464:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 50 | 2019-05-25 14:12:10,473:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 51 | 2019-05-25 14:12:15,487:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 52 | 2019-05-25 14:12:20,494:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 53 | 2019-05-25 14:12:25,501:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 54 | 2019-05-25 14:12:30,507:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 55 | 2019-05-25 14:12:35,513:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 56 | 2019-05-25 14:12:40,521:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 57 | 2019-05-25 14:12:45,526:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 58 | 2019-05-25 14:12:50,532:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 59 | 2019-05-25 14:12:55,537:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 60 | 2019-05-25 14:13:00,543:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 61 | 2019-05-25 14:13:05,548:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 62 | 2019-05-25 14:13:10,555:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 63 | 2019-05-25 14:13:15,562:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 64 | 2019-05-25 14:13:20,569:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 65 | 2019-05-25 14:13:25,576:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 66 | 2019-05-25 14:13:30,581:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 67 | 2019-05-25 14:13:35,588:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 68 | 2019-05-25 14:13:40,593:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 69 | 2019-05-25 14:13:45,599:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 70 | 2019-05-25 14:13:50,606:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 71 | 2019-05-25 14:13:55,613:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 72 | 2019-05-25 14:14:00,619:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 73 | 2019-05-25 14:14:05,625:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 74 | 2019-05-25 14:14:10,633:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 75 | 2019-05-25 14:14:15,639:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 76 | 2019-05-25 14:14:20,641:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 77 | 2019-05-25 14:14:25,649:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 78 | 2019-05-25 14:14:30,656:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 79 | 2019-05-25 14:14:35,662:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 80 | 2019-05-25 14:14:40,670:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 81 | 2019-05-25 14:14:45,673:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 82 | 2019-05-25 14:14:50,680:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 83 | 2019-05-25 14:14:55,687:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 84 | 2019-05-25 14:15:00,693:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 85 | 2019-05-25 14:15:05,700:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 86 | 2019-05-25 14:15:10,709:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 87 | 2019-05-25 14:15:15,717:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 88 | 2019-05-25 14:15:20,718:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 89 | 2019-05-25 14:15:25,727:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 90 | 2019-05-25 14:15:30,734:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 91 | 2019-05-25 14:15:35,740:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 92 | 2019-05-25 14:15:40,745:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 93 | 2019-05-25 14:15:45,753:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 94 | 2019-05-25 14:15:50,759:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 95 | 2019-05-25 14:15:55,765:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 96 | 2019-05-25 14:16:00,773:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 97 | 2019-05-25 14:16:05,780:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 98 | 2019-05-25 14:16:10,785:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 99 | 2019-05-25 14:16:15,790:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 100 | 2019-05-25 14:16:20,792:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 101 | 2019-05-25 14:16:25,798:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 102 | 2019-05-25 14:16:30,805:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 103 | 2019-05-25 14:16:35,812:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 104 | 2019-05-25 14:16:40,818:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 105 | 2019-05-25 14:16:45,823:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 106 | 2019-05-25 14:16:50,826:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 107 | 2019-05-25 14:16:55,834:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 108 | 2019-05-25 14:17:00,839:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 109 | 2019-05-25 14:17:05,846:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 110 | 2019-05-25 14:17:10,852:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 111 | 2019-05-25 14:17:15,857:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 112 | 2019-05-25 14:17:20,866:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 113 | 2019-05-25 14:17:25,872:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 114 | 2019-05-25 14:17:30,878:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 115 | 2019-05-25 14:17:35,885:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 116 | 2019-05-25 14:17:40,893:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 117 | 2019-05-25 14:17:45,898:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 118 | 2019-05-25 14:17:50,903:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 119 | 2019-05-25 14:17:55,905:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 120 | 2019-05-25 14:18:00,913:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 121 | 2019-05-25 14:18:05,919:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 122 | 2019-05-25 14:18:10,926:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 123 | 2019-05-25 14:18:15,932:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 124 | 2019-05-25 14:18:20,938:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 125 | 2019-05-25 14:18:25,941:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 126 | 2019-05-25 14:18:30,946:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 127 | 2019-05-25 14:18:35,953:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 128 | 2019-05-25 14:18:40,986:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 129 | 2019-05-25 14:18:45,992:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 130 | 2019-05-25 14:18:51,001:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 131 | 2019-05-25 14:18:56,003:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 132 | 2019-05-25 14:19:01,031:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 133 | 2019-05-25 14:19:06,036:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 134 | 2019-05-25 14:19:11,043:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 135 | 2019-05-25 14:19:16,048:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 136 | 2019-05-25 14:19:21,053:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 137 | 2019-05-25 14:19:26,059:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 138 | 2019-05-25 14:19:31,065:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 139 | 2019-05-25 14:19:36,071:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 140 | 2019-05-25 14:19:41,076:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 141 | 2019-05-25 14:19:46,081:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 142 | 2019-05-25 14:19:51,087:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 143 | 2019-05-25 14:19:56,093:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 144 | 2019-05-25 14:20:01,096:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 145 | 2019-05-25 14:20:06,099:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 146 | 2019-05-25 14:20:11,106:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 147 | 2019-05-25 14:20:16,113:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 148 | 2019-05-25 14:20:21,120:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 149 | 2019-05-25 14:20:26,126:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 150 | 2019-05-25 14:20:31,132:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 151 | 2019-05-25 14:20:36,138:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 152 | 2019-05-25 14:20:41,144:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 153 | 2019-05-25 14:20:46,150:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 154 | 2019-05-25 14:20:51,157:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 155 | 2019-05-25 14:20:56,164:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 156 | 2019-05-25 14:21:01,182:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 157 | 2019-05-25 14:21:06,282:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 158 | 2019-05-25 14:21:11,289:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 159 | 2019-05-25 14:21:16,295:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 160 | 2019-05-25 14:21:21,301:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 161 | 2019-05-25 14:21:26,330:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 162 | 2019-05-25 14:21:31,337:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 163 | 2019-05-25 14:21:36,344:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 164 | 2019-05-25 14:21:41,350:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 165 | 2019-05-25 14:21:46,355:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 166 | 2019-05-25 14:21:51,377:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 167 | 2019-05-25 14:21:56,380:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 168 | 2019-05-25 14:22:01,387:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 169 | 2019-05-25 14:22:06,393:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 170 | 2019-05-25 14:22:11,399:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 171 | 2019-05-25 14:22:16,405:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 172 | 2019-05-25 14:22:21,424:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 173 | 2019-05-25 14:22:26,430:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 174 | 2019-05-25 14:22:31,437:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 175 | 2019-05-25 14:22:36,444:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 176 | 2019-05-25 14:25:26,956:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36438 177 | [src/String2UpperServer.cpp:onConnection:67] 178 | 2019-05-25 14:25:36,772:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 179 | 2019-05-25 14:25:41,779:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 180 | 2019-05-25 14:25:46,781:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 181 | 2019-05-25 14:25:51,787:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 182 | 2019-05-25 14:25:56,790:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 183 | 2019-05-25 14:26:01,797:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 184 | 2019-05-25 14:26:06,803:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 185 | 2019-05-25 14:26:11,811:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 186 | 2019-05-25 14:26:16,816:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 187 | 2019-05-25 14:26:21,823:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 188 | 2019-05-25 14:26:26,829:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 189 | 2019-05-25 14:26:31,837:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 190 | 2019-05-25 14:26:39,290:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 191 | 2019-05-25 14:26:44,299:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 192 | 2019-05-25 14:26:49,305:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 193 | 2019-05-25 14:26:54,314:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 194 | 2019-05-25 14:26:59,320:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 195 | 2019-05-25 14:27:04,328:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 196 | 2019-05-25 14:27:09,335:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 197 | 2019-05-25 14:27:14,342:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 198 | 2019-05-25 14:27:19,352:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 199 | 2019-05-25 14:27:23,669:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36440 200 | [src/String2UpperServer.cpp:onConnection:67] 201 | 2019-05-25 14:27:28,675:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 202 | 2019-05-25 14:27:33,680:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 203 | 2019-05-25 14:27:38,687:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 204 | 2019-05-25 14:27:43,693:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 205 | 2019-05-25 14:27:48,699:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 206 | 2019-05-25 14:27:53,704:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 207 | 2019-05-25 14:27:58,715:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 208 | 2019-05-25 14:28:03,721:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 209 | 2019-05-25 14:28:08,729:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 210 | 2019-05-25 14:28:13,736:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 211 | 2019-05-25 14:28:18,738:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 212 | 2019-05-25 14:28:23,744:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 213 | 2019-05-25 14:28:28,745:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 214 | 2019-05-25 14:28:33,751:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 215 | 2019-05-25 14:28:38,756:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 216 | 2019-05-25 14:28:43,762:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 217 | 2019-05-25 14:28:48,768:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 218 | 2019-05-25 14:28:53,776:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 219 | 2019-05-25 14:28:58,308:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36442 220 | [src/String2UpperServer.cpp:onConnection:67] 221 | 2019-05-25 14:29:03,313:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 222 | 2019-05-25 14:29:08,328:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 223 | 2019-05-25 14:29:13,340:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 224 | 2019-05-25 14:29:18,346:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 225 | 2019-05-25 14:29:23,352:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 226 | 2019-05-25 14:29:28,358:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 227 | 2019-05-25 14:29:33,364:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 228 | 2019-05-25 14:29:38,377:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 229 | 2019-05-25 14:29:43,379:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 230 | 2019-05-25 14:29:48,385:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 231 | 2019-05-25 14:29:53,393:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 232 | 2019-05-25 14:29:58,405:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 233 | 2019-05-25 14:30:03,408:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 234 | 2019-05-25 14:30:23,185:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36444[src/String2UpperServer.cpp:onConnection:68] 235 | 2019-05-25 14:30:28,192:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 236 | 2019-05-25 14:30:33,197:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 237 | 2019-05-25 14:30:38,205:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 238 | 2019-05-25 14:30:43,211:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 239 | 2019-05-25 14:30:48,218:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 240 | 2019-05-25 14:30:53,224:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 241 | 2019-05-25 14:30:58,231:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 242 | 2019-05-25 14:31:03,237:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 243 | 2019-05-25 14:31:08,245:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 244 | 2019-05-25 14:31:13,250:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 245 | 2019-05-25 14:31:18,256:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 246 | 2019-05-25 14:31:23,267:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 247 | 2019-05-25 14:31:28,275:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 248 | 2019-05-25 14:31:33,280:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 249 | 2019-05-25 14:31:38,289:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 250 | 2019-05-25 14:31:43,290:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 251 | 2019-05-25 14:31:48,296:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 252 | 2019-05-25 14:31:53,300:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 253 | 2019-05-25 14:31:58,303:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 254 | 2019-05-25 14:32:03,340:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 255 | 2019-05-25 14:32:08,346:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 256 | 2019-05-25 14:32:13,351:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 257 | 2019-05-25 14:32:18,390:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 258 | 2019-05-25 14:32:23,440:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 259 | 2019-05-25 14:32:28,445:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 260 | 2019-05-25 14:32:33,451:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 261 | 2019-05-25 14:32:38,490:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 262 | 2019-05-25 14:32:43,496:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 263 | 2019-05-25 14:33:02,699:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36446[src/String2UpperServer.cpp:onConnection:69] 264 | 2019-05-25 14:33:07,708:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 265 | 2019-05-25 14:33:12,714:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 266 | 2019-05-25 14:33:17,719:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 267 | 2019-05-25 14:33:22,724:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 268 | 2019-05-25 14:33:27,732:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 269 | 2019-05-25 14:33:32,738:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 270 | 2019-05-25 14:33:37,747:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 271 | 2019-05-25 14:33:42,753:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 272 | 2019-05-25 14:33:47,760:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 273 | 2019-05-25 14:33:52,767:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 274 | 2019-05-25 14:33:57,777:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 275 | 2019-05-25 14:34:02,784:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 276 | 2019-05-25 14:34:07,792:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 277 | 2019-05-25 14:34:12,798:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 278 | 2019-05-25 14:34:31,463:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36448[src/String2UpperServer.cpp:onConnection:68] 279 | 2019-05-25 14:34:36,469:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 280 | 2019-05-25 14:34:41,474:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 281 | 2019-05-25 14:34:46,480:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 282 | 2019-05-25 14:34:51,487:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 283 | 2019-05-25 14:34:56,495:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 284 | 2019-05-25 14:35:01,500:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 285 | 2019-05-25 14:35:06,507:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 286 | 2019-05-25 14:35:11,514:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 287 | 2019-05-25 14:35:16,520:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 288 | 2019-05-25 14:35:21,527:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 289 | 2019-05-25 14:35:41,740:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36450.[src/String2UpperServer.cpp:onConnection:68] 290 | 2019-05-25 14:35:46,749:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 291 | 2019-05-25 14:35:51,754:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 292 | 2019-05-25 14:35:56,764:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 293 | 2019-05-25 14:36:01,770:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 294 | 2019-05-25 14:36:06,775:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 295 | 2019-05-25 14:36:08,806:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36450close[src/String2UpperServer.cpp:onClose:82] 296 | 2019-05-25 14:36:13,813:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 297 | 2019-05-25 14:36:18,821:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 298 | 2019-05-25 14:36:23,828:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 299 | 2019-05-25 14:36:28,833:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 300 | 2019-05-25 14:36:33,839:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 301 | 2019-05-25 14:36:38,847:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 302 | 2019-05-25 14:36:43,852:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 303 | 2019-05-25 14:36:48,859:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 304 | 2019-05-25 14:36:53,864:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 305 | 2019-05-25 14:36:58,866:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 306 | 2019-05-25 14:37:03,873:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 307 | 2019-05-25 14:37:08,880:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 308 | 2019-05-25 14:37:13,890:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 309 | 2019-05-25 14:37:18,896:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 310 | 2019-05-25 14:37:23,903:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 311 | 2019-05-25 14:37:28,937:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 312 | 2019-05-25 14:37:33,942:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 313 | 2019-05-25 14:37:38,949:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 314 | 2019-05-25 14:37:43,955:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 315 | 2019-05-25 14:37:48,989:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 316 | 2019-05-25 14:37:53,994:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 317 | 2019-05-25 14:37:59,000:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 318 | 2019-05-25 14:38:04,033:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 319 | 2019-05-25 14:38:09,039:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 320 | 2019-05-25 14:38:14,044:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 321 | 2019-05-25 14:38:19,050:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 322 | 2019-05-25 14:38:24,082:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 323 | 2019-05-25 14:38:29,090:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 324 | 2019-05-25 14:38:34,097:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 325 | 2019-05-25 14:38:39,130:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 326 | 2019-05-25 14:38:44,137:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 327 | 2019-05-25 14:38:49,143:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 328 | 2019-05-25 14:38:54,150:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 329 | 2019-05-25 14:38:59,180:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 330 | 2019-05-25 14:39:04,187:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 331 | 2019-05-25 14:39:09,193:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 332 | 2019-05-25 14:39:14,200:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 333 | 2019-05-25 14:39:19,205:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 334 | 2019-05-25 14:39:24,229:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 335 | 2019-05-25 14:39:29,236:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 336 | 2019-05-25 14:39:34,243:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 337 | 2019-05-25 14:39:39,251:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 338 | 2019-05-25 14:39:44,279:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 339 | 2019-05-25 14:39:49,286:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 340 | 2019-05-25 14:39:54,292:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 341 | 2019-05-25 14:39:59,299:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 342 | 2019-05-25 14:40:04,305:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 343 | 2019-05-25 14:40:09,335:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 344 | 2019-05-25 14:40:14,342:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 345 | 2019-05-25 14:40:19,348:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 346 | 2019-05-25 14:40:24,354:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 347 | 2019-05-25 14:40:29,378:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 348 | 2019-05-25 14:40:34,384:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 349 | 2019-05-25 14:40:39,393:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 350 | 2019-05-25 14:40:44,399:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 351 | 2019-05-25 14:40:49,402:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 352 | 2019-05-25 14:40:54,428:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 353 | 2019-05-25 14:40:59,435:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 354 | 2019-05-25 14:41:04,442:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 355 | 2019-05-25 14:41:09,449:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 356 | 2019-05-25 14:41:14,454:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 357 | 2019-05-25 14:41:19,478:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 358 | 2019-05-25 14:41:24,484:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 359 | 2019-05-25 14:41:29,491:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 360 | 2019-05-25 14:41:34,497:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 361 | 2019-05-25 14:41:39,504:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 362 | 2019-05-25 14:41:44,538:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 363 | 2019-05-25 14:41:49,544:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 364 | 2019-05-25 14:41:54,549:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 365 | 2019-05-25 14:41:59,590:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 366 | 2019-05-25 14:42:04,595:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 367 | 2019-05-25 14:42:09,600:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 368 | 2019-05-25 14:42:14,640:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 369 | 2019-05-25 14:42:19,652:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 370 | 2019-05-25 14:42:24,690:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 371 | 2019-05-25 14:42:29,696:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 372 | 2019-05-25 14:42:34,703:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 373 | 2019-05-25 14:42:39,741:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 374 | 2019-05-25 14:42:44,748:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 375 | 2019-05-25 14:42:49,754:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 376 | 2019-05-25 14:42:54,785:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 377 | 2019-05-25 14:42:59,792:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 378 | 2019-05-25 14:43:04,797:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 379 | 2019-05-25 14:43:09,803:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 380 | 2019-05-25 14:43:14,833:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 381 | 2019-05-25 14:43:19,840:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 382 | 2019-05-25 14:43:24,848:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 383 | 2019-05-25 14:43:29,880:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 384 | 2019-05-25 14:43:34,887:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 385 | 2019-05-25 14:43:39,892:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 386 | 2019-05-25 14:43:44,898:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 387 | 2019-05-25 14:43:49,904:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 388 | 2019-05-25 14:43:54,936:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 389 | 2019-05-25 14:43:59,945:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 390 | 2019-05-25 14:44:04,951:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 391 | 2019-05-25 14:44:09,979:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 392 | 2019-05-25 14:44:14,982:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 393 | 2019-05-25 14:44:19,988:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 394 | 2019-05-25 14:44:24,995:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 395 | 2019-05-25 14:44:30,000:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 396 | 2019-05-25 14:44:35,004:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 397 | 2019-05-25 14:44:40,028:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 398 | 2019-05-25 14:44:45,031:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 399 | 2019-05-25 14:44:50,039:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 400 | 2019-05-25 14:44:55,044:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 401 | 2019-05-25 14:45:00,051:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 402 | 2019-05-25 14:45:05,053:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 403 | 2019-05-25 14:45:10,077:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 404 | 2019-05-25 14:45:15,084:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 405 | 2019-05-25 14:45:20,089:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 406 | 2019-05-25 14:45:25,094:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 407 | 2019-05-25 14:45:30,100:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 408 | 2019-05-25 14:45:35,127:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 409 | 2019-05-25 14:45:40,135:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 410 | 2019-05-25 14:45:45,142:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 411 | 2019-05-25 14:45:50,148:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 412 | 2019-05-25 14:45:55,154:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 413 | 2019-05-25 14:46:00,177:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 414 | 2019-05-25 14:46:05,183:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 415 | 2019-05-25 14:46:10,189:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 416 | 2019-05-25 14:46:15,194:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 417 | 2019-05-25 14:46:20,201:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 418 | 2019-05-25 14:46:25,226:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 419 | 2019-05-25 14:46:30,232:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 420 | 2019-05-25 14:46:35,238:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 421 | 2019-05-25 14:46:40,244:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 422 | 2019-05-25 14:46:45,252:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 423 | 2019-05-25 14:46:50,276:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 424 | 2019-05-25 14:46:55,282:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 425 | 2019-05-25 14:47:00,287:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 426 | 2019-05-25 14:47:05,294:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 427 | 2019-05-25 14:47:10,300:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 428 | 2019-05-25 14:47:15,325:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 429 | 2019-05-25 14:47:20,330:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 430 | 2019-05-25 14:47:25,337:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 431 | 2019-05-25 14:47:30,344:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 432 | 2019-05-25 14:47:35,351:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 433 | 2019-05-25 14:47:40,375:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 434 | 2019-05-25 14:47:45,377:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 435 | 2019-05-25 14:47:50,379:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 436 | 2019-05-25 14:47:55,386:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 437 | 2019-05-25 14:48:00,393:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 438 | 2019-05-25 14:48:05,401:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 439 | 2019-05-25 14:48:10,426:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 440 | 2019-05-25 14:48:15,432:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 441 | 2019-05-25 14:48:20,438:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 442 | 2019-05-25 14:48:25,444:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 443 | 2019-05-25 14:48:30,449:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 444 | 2019-05-25 14:48:35,474:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 445 | 2019-05-25 14:48:40,481:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 446 | 2019-05-25 14:48:45,487:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 447 | 2019-05-25 14:48:50,494:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 448 | 2019-05-25 14:48:55,500:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 449 | 2019-05-25 14:49:00,524:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 450 | 2019-05-25 14:49:05,531:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 451 | 2019-05-25 14:49:10,537:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 452 | 2019-05-25 14:49:15,544:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 453 | 2019-05-25 14:49:20,549:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 454 | 2019-05-25 14:49:25,555:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 455 | 2019-05-25 14:49:30,578:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 456 | 2019-05-25 14:49:35,584:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 457 | 2019-05-25 14:49:40,592:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 458 | 2019-05-25 14:49:45,598:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 459 | 2019-05-25 14:49:50,601:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 460 | 2019-05-25 14:49:55,623:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 461 | 2019-05-25 14:50:00,630:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 462 | 2019-05-25 14:50:05,636:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 463 | 2019-05-25 14:50:10,641:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 464 | 2019-05-25 14:50:15,649:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 465 | 2019-05-25 14:50:20,654:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 466 | 2019-05-25 14:50:25,660:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 467 | 2019-05-25 14:50:30,666:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 468 | 2019-05-25 14:50:35,673:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 469 | 2019-05-25 14:50:40,678:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 470 | 2019-05-25 14:50:45,684:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 471 | 2019-05-25 14:50:50,691:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 472 | 2019-05-25 14:50:55,698:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 473 | 2019-05-25 14:51:00,705:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 474 | 2019-05-25 14:51:05,727:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 475 | 2019-05-25 14:51:10,733:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 476 | 2019-05-25 14:51:15,741:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 477 | 2019-05-25 14:51:20,748:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 478 | 2019-05-25 14:51:25,754:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 479 | 2019-05-25 14:51:30,773:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 480 | 2019-05-25 14:51:35,779:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 481 | 2019-05-25 14:51:40,786:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 482 | 2019-05-25 14:51:45,838:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 483 | 2019-05-25 14:51:50,844:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 484 | 2019-05-25 14:51:55,851:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 485 | 2019-05-25 14:52:00,872:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 486 | 2019-05-25 14:52:05,878:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 487 | 2019-05-25 14:52:10,884:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 488 | 2019-05-25 14:52:15,891:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 489 | 2019-05-25 14:52:20,898:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 490 | 2019-05-25 14:52:25,904:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 491 | 2019-05-25 14:52:30,921:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 492 | 2019-05-25 14:52:35,925:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 493 | 2019-05-25 14:52:40,930:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 494 | 2019-05-25 14:52:45,937:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 495 | 2019-05-25 14:52:50,945:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 496 | 2019-05-25 14:52:55,952:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 497 | 2019-05-25 14:53:00,971:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 498 | 2019-05-25 14:53:05,974:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 499 | 2019-05-25 14:53:10,980:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 500 | 2019-05-25 14:53:15,986:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 501 | 2019-05-25 14:53:20,993:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 502 | 2019-05-25 14:53:25,999:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 503 | 2019-05-25 14:53:31,006:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 504 | 2019-05-25 14:53:36,024:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 505 | 2019-05-25 14:53:41,032:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 506 | 2019-05-25 14:53:46,038:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 507 | 2019-05-25 14:53:51,045:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 508 | 2019-05-25 14:53:56,052:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 509 | 2019-05-25 14:54:01,069:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 510 | 2019-05-25 14:54:06,074:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 511 | 2019-05-25 14:54:11,080:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 512 | 2019-05-25 14:54:16,087:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 513 | 2019-05-25 14:54:21,094:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 514 | 2019-05-25 14:54:26,097:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 515 | 2019-05-25 14:54:31,098:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 516 | 2019-05-25 14:54:36,101:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 517 | 2019-05-25 14:54:41,119:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 518 | 2019-05-25 14:54:46,125:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 519 | 2019-05-25 14:54:51,142:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 520 | 2019-05-25 14:54:56,149:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 521 | 2019-05-25 14:55:01,153:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 522 | 2019-05-25 14:55:06,154:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 523 | 2019-05-25 14:55:11,175:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 524 | 2019-05-25 14:55:16,181:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 525 | 2019-05-25 14:55:21,188:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 526 | 2019-05-25 14:55:26,194:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 527 | 2019-05-25 14:55:31,201:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 528 | 2019-05-25 14:55:36,218:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 529 | 2019-05-25 14:55:41,223:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 530 | 2019-05-25 14:55:46,233:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 531 | 2019-05-25 14:55:51,239:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 532 | 2019-05-25 14:55:56,245:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 533 | 2019-05-25 14:56:01,250:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 534 | 2019-05-25 14:56:06,251:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 535 | 2019-05-25 14:56:11,268:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 536 | 2019-05-25 14:56:16,276:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 537 | 2019-05-25 14:56:21,279:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 538 | 2019-05-25 14:56:26,285:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 539 | 2019-05-25 14:56:31,291:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 540 | 2019-05-25 14:56:36,295:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 541 | 2019-05-25 14:56:41,303:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:145] 542 | 2019-05-25 14:57:50,269:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36452.[src/String2UpperServer.cpp:onConnection:66] 543 | 2019-05-25 14:57:55,274:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 544 | 2019-05-25 14:58:00,280:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 545 | 2019-05-25 14:59:52,510:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 546 | 2019-05-25 14:59:56,850:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36454.[src/String2UpperServer.cpp:onConnection:66] 547 | 2019-05-25 15:00:01,858:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 548 | 2019-05-25 15:00:08,338:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 549 | 2019-05-25 15:00:14,789:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 550 | 2019-05-25 15:00:15,183:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36456.[src/String2UpperServer.cpp:onConnection:66] 551 | 2019-05-25 15:00:24,114:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 552 | 2019-05-25 15:00:29,120:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 553 | 2019-05-25 15:00:34,126:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 554 | 2019-05-25 15:00:39,134:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 555 | 2019-05-25 15:00:44,140:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 556 | 2019-05-25 15:00:49,146:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 557 | 2019-05-25 15:00:54,152:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 558 | 2019-05-25 15:00:59,158:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 559 | 2019-05-25 15:01:03,501:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36454 close.[src/String2UpperServer.cpp:onClose:80] 560 | 2019-05-25 15:01:08,506:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 561 | 2019-05-25 15:01:13,512:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 562 | 2019-05-25 15:01:18,518:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 563 | 2019-05-25 15:05:57,645:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 564 | 2019-05-25 15:05:58,160:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36458.[src/String2UpperServer.cpp:onConnection:66] 565 | 2019-05-25 15:06:10,306:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 566 | 2019-05-25 15:06:10,588:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36460.[src/String2UpperServer.cpp:onConnection:66] 567 | 2019-05-25 15:06:18,784:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 568 | 2019-05-25 15:06:23,791:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 569 | 2019-05-25 15:06:28,796:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 570 | 2019-05-25 15:06:33,803:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 571 | 2019-05-25 15:06:38,808:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 572 | 2019-05-25 15:06:43,815:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 573 | 2019-05-25 15:06:48,820:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 574 | 2019-05-25 15:06:53,828:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 575 | 2019-05-25 15:06:58,834:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 576 | 2019-05-25 15:07:03,841:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 577 | 2019-05-25 15:07:08,847:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 578 | 2019-05-25 15:07:13,890:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 579 | 2019-05-25 15:07:18,899:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 580 | 2019-05-25 15:07:23,905:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 581 | 2019-05-25 15:07:28,946:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 582 | 2019-05-25 15:07:33,952:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 583 | 2019-05-25 15:07:38,986:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 584 | 2019-05-25 15:07:43,992:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 585 | 2019-05-25 15:07:48,999:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 586 | 2019-05-25 15:07:54,038:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 587 | 2019-05-25 15:07:59,045:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 588 | 2019-05-25 15:08:04,051:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 589 | 2019-05-25 15:08:09,085:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 590 | 2019-05-25 15:08:14,091:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 591 | 2019-05-25 15:08:19,097:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 592 | 2019-05-25 15:08:24,105:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 593 | 2019-05-25 15:08:29,132:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 594 | 2019-05-25 15:08:34,139:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 595 | 2019-05-25 15:08:39,144:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 596 | 2019-05-25 15:08:44,151:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 597 | 2019-05-25 15:08:49,154:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 598 | 2019-05-25 15:08:54,160:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 599 | 2019-05-25 15:08:59,166:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 600 | 2019-05-25 15:09:04,172:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 601 | 2019-05-25 15:09:09,178:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 602 | 2019-05-25 15:09:14,184:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 603 | 2019-05-25 15:09:19,198:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 604 | 2019-05-25 15:09:24,204:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 605 | 2019-05-25 15:09:29,218:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 606 | 2019-05-25 15:09:34,229:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 607 | 2019-05-25 15:09:39,235:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 608 | 2019-05-25 15:09:44,241:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 609 | 2019-05-25 15:09:49,248:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 610 | 2019-05-25 15:09:54,254:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 611 | 2019-05-25 15:09:59,276:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 612 | 2019-05-25 15:10:04,281:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 613 | 2019-05-25 15:12:12,964:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 614 | 2019-05-25 15:12:15,772:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36462.[src/String2UpperServer.cpp:onConnection:66] 615 | 2019-05-25 15:12:25,964:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 616 | 2019-05-25 15:12:29,748:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36464.[src/String2UpperServer.cpp:onConnection:66] 617 | 2019-05-25 15:12:37,138:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 618 | 2019-05-25 15:12:42,147:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 619 | 2019-05-25 15:12:47,158:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 620 | 2019-05-25 15:12:52,166:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 621 | 2019-05-25 15:12:57,172:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 622 | 2019-05-25 15:13:02,179:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 623 | 2019-05-25 15:13:07,186:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 624 | 2019-05-25 15:13:12,192:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 625 | 2019-05-25 15:13:17,198:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 626 | 2019-05-25 15:13:22,207:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 627 | 2019-05-25 15:13:27,214:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 628 | 2019-05-25 15:13:32,219:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 629 | 2019-05-25 15:13:34,125:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36464 close.[src/String2UpperServer.cpp:onClose:80] 630 | 2019-05-25 15:13:38,678:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36466.[src/String2UpperServer.cpp:onConnection:66] 631 | 2019-05-25 15:13:43,685:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 632 | 2019-05-25 15:13:48,687:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 633 | 2019-05-25 15:13:54,698:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 634 | 2019-05-25 15:13:59,703:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 635 | 2019-05-25 15:14:04,709:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 636 | 2019-05-25 15:14:09,718:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 637 | 2019-05-25 15:14:14,724:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 638 | 2019-05-25 15:14:19,732:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 639 | 2019-05-25 15:14:20,406:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36466 close.[src/String2UpperServer.cpp:onClose:80] 640 | 2019-05-25 15:14:25,228:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36468.[src/String2UpperServer.cpp:onConnection:66] 641 | 2019-05-25 15:14:33,106:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 642 | 2019-05-25 15:14:38,115:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 643 | 2019-05-25 15:14:43,120:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 644 | 2019-05-25 15:14:48,127:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 645 | 2019-05-25 15:14:53,133:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 646 | 2019-05-25 15:14:58,138:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 647 | 2019-05-25 15:15:03,143:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 648 | 2019-05-25 15:15:08,149:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 649 | 2019-05-25 15:15:13,150:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 650 | 2019-05-25 15:15:18,156:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 651 | 2019-05-25 15:15:23,163:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 652 | 2019-05-25 15:15:28,164:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 653 | 2019-05-25 15:15:33,170:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 654 | 2019-05-25 15:15:38,178:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 655 | 2019-05-25 15:15:43,184:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 656 | 2019-05-25 15:15:48,191:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 657 | 2019-05-25 15:15:53,197:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 658 | 2019-05-25 15:15:58,204:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 659 | 2019-05-25 15:16:03,211:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 660 | 2019-05-25 15:16:08,218:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 661 | 2019-05-25 15:16:13,226:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 662 | 2019-05-25 15:16:18,231:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 663 | 2019-05-25 15:16:23,238:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 664 | 2019-05-25 15:16:28,245:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 665 | 2019-05-25 15:16:33,250:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 666 | 2019-05-25 15:16:38,259:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 667 | 2019-05-25 15:16:39,013:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36468 close.[src/String2UpperServer.cpp:onClose:80] 668 | 2019-05-25 15:16:43,390:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36470.[src/String2UpperServer.cpp:onConnection:66] 669 | 2019-05-25 15:16:51,311:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 670 | 2019-05-25 15:16:56,317:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 671 | 2019-05-25 15:17:01,322:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 672 | 2019-05-25 15:17:06,327:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 673 | 2019-05-25 15:17:11,333:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 674 | 2019-05-25 15:17:12,726:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36470 close.[src/String2UpperServer.cpp:onClose:80] 675 | 2019-05-25 15:17:47,071:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 676 | 2019-05-25 15:17:48,710:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36472.[src/String2UpperServer.cpp:onConnection:66] 677 | 2019-05-25 15:17:57,346:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 678 | 2019-05-25 15:18:02,351:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 679 | 2019-05-25 15:18:07,360:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 680 | 2019-05-25 15:18:12,367:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 681 | 2019-05-25 15:18:17,374:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 682 | 2019-05-25 15:18:22,381:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 683 | 2019-05-25 15:18:27,387:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 684 | 2019-05-25 15:18:32,393:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 685 | 2019-05-25 15:18:32,740:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36472 close.[src/String2UpperServer.cpp:onClose:80] 686 | 2019-05-25 15:18:37,044:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36474.[src/String2UpperServer.cpp:onConnection:66] 687 | 2019-05-25 15:18:46,148:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 688 | 2019-05-25 15:18:51,155:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 689 | 2019-05-25 15:18:56,162:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 690 | 2019-05-25 15:19:01,168:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 691 | 2019-05-25 15:19:03,820:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36474 close.[src/String2UpperServer.cpp:onClose:80] 692 | 2019-05-25 15:19:08,403:mycat INFO :127.0.0.1:9999 -> 127.0.0.1:36476.[src/String2UpperServer.cpp:onConnection:66] 693 | 2019-05-25 15:19:19,946:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 694 | 2019-05-25 15:19:24,954:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 695 | 2019-05-25 15:19:29,961:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 696 | 2019-05-25 15:19:34,967:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 697 | 2019-05-25 15:19:39,974:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 698 | 2019-05-25 15:19:44,980:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 699 | 2019-05-25 15:19:49,985:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 700 | 2019-05-25 15:19:54,992:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 701 | 2019-05-25 15:19:59,997:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 702 | 2019-05-25 15:20:05,003:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 703 | 2019-05-25 15:20:10,003:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 704 | 2019-05-25 15:20:15,018:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 705 | 2019-05-25 15:20:20,360:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 706 | 2019-05-25 15:20:25,376:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 707 | 2019-05-25 15:20:30,376:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 708 | 2019-05-25 15:20:35,383:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 709 | 2019-05-25 15:20:40,387:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 710 | 2019-05-25 15:20:45,398:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 711 | 2019-05-25 15:20:50,404:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 712 | 2019-05-25 15:20:55,410:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 713 | 2019-05-25 15:21:00,417:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 714 | 2019-05-25 15:21:05,424:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 715 | 2019-05-25 15:21:10,432:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 716 | 2019-05-25 15:21:15,439:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 717 | 2019-05-25 15:21:20,445:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 718 | 2019-05-25 15:21:25,451:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 719 | 2019-05-25 15:21:30,457:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 720 | 2019-05-25 15:21:35,464:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 721 | 2019-05-25 15:21:40,471:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 722 | 2019-05-25 15:21:45,477:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 723 | 2019-05-25 15:21:50,484:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 724 | 2019-05-25 15:21:55,490:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 725 | 2019-05-25 15:22:00,495:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 726 | 2019-05-25 15:22:05,503:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 727 | 2019-05-25 15:22:10,511:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 728 | 2019-05-25 15:22:15,517:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 729 | 2019-05-25 15:22:20,524:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 730 | 2019-05-25 15:22:25,525:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 731 | 2019-05-25 15:22:30,530:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 732 | 2019-05-25 15:22:35,532:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 733 | 2019-05-25 15:22:40,539:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 734 | 2019-05-25 15:22:45,545:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 735 | 2019-05-25 15:22:50,551:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 736 | 2019-05-25 15:22:55,557:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 737 | 2019-05-25 15:23:00,563:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 738 | 2019-05-25 15:23:05,569:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 739 | 2019-05-25 15:23:10,575:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 740 | 2019-05-25 15:23:15,581:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 741 | 2019-05-25 15:23:20,587:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 742 | 2019-05-25 15:23:25,591:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 743 | 2019-05-25 15:23:30,596:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 744 | 2019-05-25 15:23:35,597:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 745 | 2019-05-25 15:23:40,603:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 746 | 2019-05-25 15:23:45,614:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 747 | 2019-05-25 15:23:50,619:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 748 | 2019-05-25 15:23:55,624:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 749 | 2019-05-25 15:24:00,626:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 750 | 2019-05-25 15:24:05,633:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 751 | 2019-05-25 15:24:10,640:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 752 | 2019-05-25 15:24:15,647:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 753 | 2019-05-25 15:24:20,652:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 754 | 2019-05-25 15:24:25,659:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 755 | 2019-05-25 15:24:30,666:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 756 | 2019-05-25 15:24:35,673:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 757 | 2019-05-25 15:24:40,679:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 758 | 2019-05-25 15:24:45,685:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 759 | 2019-05-25 15:24:50,693:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 760 | 2019-05-25 15:24:55,698:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 761 | 2019-05-25 15:25:00,706:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 762 | 2019-05-25 15:25:05,712:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 763 | 2019-05-25 15:25:10,716:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 764 | 2019-05-25 15:25:15,721:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 765 | 2019-05-25 15:25:20,727:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 766 | 2019-05-25 15:25:25,734:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 767 | 2019-05-25 15:25:30,739:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 768 | 2019-05-25 15:25:35,745:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 769 | 2019-05-25 15:25:40,748:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 770 | 2019-05-25 15:25:45,754:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 771 | 2019-05-25 15:25:50,760:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 772 | 2019-05-25 15:25:55,768:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 773 | 2019-05-25 15:26:00,775:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 774 | 2019-05-25 15:26:05,780:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 775 | 2019-05-25 15:26:10,785:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 776 | 2019-05-25 15:26:15,791:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 777 | 2019-05-25 15:26:20,797:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 778 | 2019-05-25 15:26:25,803:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 779 | 2019-05-25 15:26:30,805:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 780 | 2019-05-25 15:26:35,809:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 781 | 2019-05-25 15:26:40,815:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 782 | 2019-05-25 15:26:45,822:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 783 | 2019-05-25 15:26:50,828:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 784 | 2019-05-25 15:26:55,834:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 785 | 2019-05-25 15:27:00,840:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 786 | 2019-05-25 15:27:05,849:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 787 | 2019-05-25 15:27:10,856:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 788 | 2019-05-25 15:27:15,862:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 789 | 2019-05-25 15:27:20,868:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 790 | 2019-05-25 15:27:25,875:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 791 | 2019-05-25 15:27:30,881:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 792 | 2019-05-25 15:27:35,888:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 793 | 2019-05-25 15:27:40,895:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 794 | 2019-05-25 15:27:45,901:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 795 | 2019-05-25 15:27:50,909:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 796 | 2019-05-25 15:27:55,915:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 797 | 2019-05-25 15:28:00,922:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 798 | 2019-05-25 15:28:05,928:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 799 | 2019-05-25 15:28:10,933:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 800 | 2019-05-25 15:28:15,941:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 801 | 2019-05-25 15:28:20,947:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 802 | 2019-05-25 15:28:25,949:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 803 | 2019-05-25 15:28:30,951:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 804 | 2019-05-25 15:28:35,952:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 805 | 2019-05-25 15:28:40,957:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 806 | 2019-05-25 15:28:45,960:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 807 | 2019-05-25 15:28:50,963:mycat INFO :epoll timeout.[src/net/EpollPoller.cpp:waitEpollFd:144] 808 | -------------------------------------------------------------------------------- /server/server.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icoty/cs_threadpool_epoll_mq/be60e390a9c366f810f6b33da99e9fa67337cf46/server/server.exe -------------------------------------------------------------------------------- /server/server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./server.exe ../conf/my.conf 3 | -------------------------------------------------------------------------------- /src/Configuration.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Configuration.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Configuration.hpp" 6 | #include "Log4func.hpp" 7 | #include 8 | #include 9 | #include 10 | 11 | namespace yangyu 12 | { 13 | 14 | Configuration::Configuration(const string& filepath) 15 | :_filepath(filepath) 16 | { 17 | init(); 18 | } 19 | 20 | void Configuration::debug() 21 | { 22 | for(auto & ele:_configMap) 23 | std::cout << ele.first << '\t' << ele.second << std::endl; 24 | } 25 | 26 | void Configuration::init() 27 | { 28 | std::ifstream _in(_filepath.c_str()); 29 | if(!_in.good()){ 30 | LogError("_in open error!"); 31 | _in.close(); 32 | return; 33 | } 34 | 35 | string line; 36 | while(getline(_in,line)) 37 | { 38 | std::istringstream iss(line); 39 | std::string key; 40 | std::string value; 41 | iss >> key >> value; 42 | _configMap[key]=value; 43 | } 44 | _in.close(); 45 | } 46 | 47 | map & Configuration::getConfigMap() 48 | { return _configMap; } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/String2Upper.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file String2Upper.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "String2Upper.hpp" 6 | #include "FileName.hpp" 7 | #include "Log4func.hpp" 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include // 全部转大写或小写 14 | using std::istringstream; 15 | using std::ifstream; 16 | using std::istringstream; 17 | using std::vector; 18 | using std::pair; 19 | 20 | namespace yangyu 21 | { 22 | 23 | String2Upper::String2Upper(Configuration & conf) 24 | :_conf(conf) 25 | { } 26 | 27 | string String2Upper::doQuery(const string & word) 28 | { 29 | string ret = word; 30 | // 全部转大写 31 | transform(ret.begin(), ret.end(), ret.begin(), ::toupper); 32 | return ret; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/String2UpperServer.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file String2UpperServer.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include "FileName.hpp" 7 | #include "String2UpperServer.hpp" 8 | #include "String2Upper.hpp" 9 | #include 10 | #include 11 | using std::string; 12 | 13 | namespace 14 | { 15 | 16 | string AbsolutelyPath(const string &s) 17 | { 18 | char *cur=getcwd(NULL,0); 19 | int loc=s.rfind('/'); 20 | 21 | string path=s.substr(0,loc); 22 | chdir(path.c_str()); 23 | string cfgAbsPath=getcwd(NULL,0); 24 | cfgAbsPath.append("/").append(s.substr(loc+1)); 25 | chdir(cur); 26 | return cfgAbsPath; 27 | } 28 | 29 | void Trim(string &str) 30 | { 31 | //去除首尾空格 32 | str[str.size()-1]=' ';//去除最后一个换行符 33 | str.erase(str.find_last_not_of(' ')+1); 34 | str.erase(0,str.find_first_not_of(' ')); 35 | for(size_t idx=0;idx!=str.size();++idx)//转换成小写 36 | if(str[idx]>='A'&&str[idx]<='Z') 37 | str[idx]+=32; 38 | } 39 | 40 | } 41 | 42 | namespace yangyu 43 | { 44 | 45 | String2UpperServer::String2UpperServer(const string &cfgFileName) 46 | :_conf(AbsolutelyPath(cfgFileName)) 47 | ,_wordquery(_conf) 48 | ,_threadpool(5,10) // 创建5个计算线程,消息队列大小为10,并发高的话可以把数值改大 49 | ,_tcpserver(_conf.getConfigMap()[IP], 50 | atoi(_conf.getConfigMap()[PORT].c_str())) 51 | { } 52 | 53 | void String2UpperServer::start() 54 | { 55 | _threadpool.start(); 56 | 57 | _tcpserver.setConnectCallback(std::bind(&String2UpperServer::onConnection,this,std::placeholders::_1)); 58 | _tcpserver.setMessageCallback(std::bind(&String2UpperServer::onMessage,this,std::placeholders::_1)); 59 | _tcpserver.setCloseCallback(std::bind(&String2UpperServer::onClose,this,std::placeholders::_1)); 60 | 61 | _tcpserver.start(); 62 | } 63 | 64 | void String2UpperServer::onConnection(TcpConnectionPtr conn) 65 | { 66 | LogInfo(conn->toString() + "."); 67 | conn->send("hello, welcome to Chat Server."); 68 | } 69 | 70 | void String2UpperServer::onMessage(TcpConnectionPtr conn) 71 | { 72 | std::string queryWord(conn->receive()); 73 | Trim(queryWord);//预处理 74 | 75 | _threadpool.addTask(std::bind(&yangyu::String2UpperServer::doQuery,this,conn,queryWord)); 76 | } 77 | 78 | void String2UpperServer::onClose(TcpConnectionPtr conn) 79 | { 80 | LogInfo(conn->toString() + " close."); 81 | } 82 | 83 | void String2UpperServer::doQuery(TcpConnectionPtr & conn,const string & query) 84 | { 85 | string result=_wordquery.doQuery(query); 86 | conn->sendInLoop(result); 87 | } 88 | 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/log/Log4func.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Log4func.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | Mylog * Mylog::_pInstance=NULL; 12 | 13 | Mylog * Mylog::getInstance() 14 | { 15 | if(NULL==_pInstance) 16 | { 17 | _pInstance = new Mylog; 18 | } 19 | return _pInstance; 20 | } 21 | 22 | void Mylog::destroy() 23 | { 24 | if(_pInstance){ 25 | Category::shutdown(); 26 | delete _pInstance; 27 | } 28 | } 29 | 30 | Mylog::Mylog() 31 | :_cat(Category::getRoot().getInstance("mycat")) 32 | { 33 | PatternLayout *ptn1=new PatternLayout(); 34 | ptn1->setConversionPattern("%d:%c %p %x:%m%n"); 35 | PatternLayout *ptn2=new PatternLayout(); 36 | ptn2->setConversionPattern("%d:%c %p %x:%m%n"); 37 | 38 | OstreamAppender *osApp=new OstreamAppender("osApp",&cout); 39 | osApp->setLayout(ptn1); 40 | 41 | FileAppender *fileApp=new FileAppender("fileApp","./log/log4test.log"); 42 | fileApp->setLayout(ptn2); 43 | 44 | _cat.addAppender(osApp); 45 | _cat.addAppender(fileApp); 46 | 47 | _cat.setPriority(Priority::DEBUG); 48 | } 49 | 50 | Mylog::~Mylog() 51 | {} 52 | 53 | void Mylog::warn(const string & msg) 54 | { 55 | _cat.warn(msg.c_str());//c++11切换至c标准 56 | } 57 | 58 | 59 | void Mylog::debug(const string & msg) 60 | { 61 | _cat.debug(msg.c_str()); 62 | } 63 | 64 | 65 | void Mylog::info(const string & msg) 66 | { 67 | _cat.info(msg.c_str()); 68 | } 69 | 70 | 71 | void Mylog::error(const string & msg) 72 | { 73 | _cat.error(msg.c_str()); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file main.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include "String2UpperServer.hpp" 7 | #include 8 | using std::cout; 9 | using std::endl; 10 | 11 | int main(int argc,char **argv) 12 | { 13 | if(argc!=2){ 14 | LogError("input my.conf path!"); 15 | return -1; 16 | } 17 | cout< 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | //匿名空间,与系统匿名空间有何区别?? 17 | //非类内成员,供类内调用,辅助初始化 18 | namespace 19 | { 20 | 21 | int createEpollFd() //free函数 全局函数 22 | { 23 | int epollfd = ::epoll_create1(0);//????????? 24 | if(epollfd == -1) 25 | { 26 | LogError("create epoll fd error!"); 27 | exit(EXIT_FAILURE); 28 | } 29 | return epollfd; 30 | } 31 | 32 | int createEventfd() 33 | { 34 | int fd = ::eventfd(0,0); 35 | if(-1 == fd){ 36 | LogError("create event fd error!"); 37 | exit(EXIT_FAILURE); 38 | } 39 | return fd; 40 | } 41 | 42 | void addEpollReadFd(int epollfd, int fd) 43 | { 44 | struct epoll_event ev; 45 | ev.data.fd = fd; 46 | ev.events = EPOLLIN; 47 | if(epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev) == -1) 48 | { 49 | LogError("add epoll fd error!"); 50 | exit(EXIT_FAILURE); 51 | } 52 | } 53 | 54 | void delEpollReadFd(int epollfd, int fd) 55 | { 56 | struct epoll_event ev; 57 | ev.data.fd = fd; 58 | //ev.events = EPOLLIN; 59 | if(epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, &ev) == -1) 60 | { 61 | LogError("del epoll fd error!"); 62 | exit(EXIT_FAILURE); 63 | } 64 | } 65 | 66 | int acceptConnFd(int listenfd) 67 | { 68 | int peerfd = ::accept(listenfd, NULL, NULL); 69 | if(peerfd == -1) 70 | { 71 | LogError("accept conn fd!"); 72 | exit(EXIT_FAILURE); 73 | } 74 | return peerfd; 75 | } 76 | 77 | //预览数据 78 | ssize_t recvPeek(int sockfd, void *buf, size_t len) 79 | { 80 | int nread; 81 | do 82 | { 83 | nread = ::recv(sockfd, buf, len, MSG_PEEK); 84 | } 85 | while(nread == -1 && errno == EINTR); 86 | 87 | return nread; 88 | } 89 | 90 | //通过预览数据 判断conn是否关闭 91 | bool isConnectionClosed(int sockfd) 92 | { 93 | char buf[1024]; 94 | ssize_t nread = recvPeek(sockfd, buf, sizeof buf); 95 | if(nread == -1) 96 | { 97 | LogError("recvPeek!"); 98 | } 99 | 100 | return (nread == 0); 101 | } 102 | 103 | }//end anonymous namespace 104 | 105 | 106 | namespace yangyu 107 | { 108 | 109 | EpollPoller::EpollPoller(int listenfd) 110 | : _epollfd(createEpollFd()) 111 | ,_listenfd(listenfd) 112 | ,_eventfd(createEventfd()) 113 | ,_isLooping(false) 114 | ,_events(1024) 115 | { 116 | addEpollReadFd(_epollfd, listenfd); 117 | addEpollReadFd(_epollfd,_eventfd); 118 | } 119 | 120 | EpollPoller::~EpollPoller() 121 | { 122 | ::close(_epollfd);//内部关闭机制?? 123 | } 124 | 125 | 126 | void EpollPoller::waitEpollFd() 127 | { 128 | int nready; 129 | do 130 | { 131 | nready = ::epoll_wait(_epollfd, 132 | &(*_events.begin()), 133 | static_cast(_events.size()), 134 | 5000); 135 | }while(nready == -1 && errno == EINTR); 136 | 137 | if(nready == -1) 138 | { 139 | LogError("epoll wait error!"); 140 | exit(EXIT_FAILURE); 141 | } 142 | else if(nready == 0) 143 | { 144 | //LogInfo("epoll timeout."); 145 | } 146 | else 147 | { 148 | //当vector满时,扩充内存 149 | if(nready == static_cast(_events.size())) 150 | { 151 | _events.resize(_events.size() * 2);//动态扩容,调用vector.resize() 152 | } 153 | 154 | for(int ix = 0; ix != nready; ++ix) 155 | { 156 | if(_events[ix].data.fd == _listenfd)//data结构体内部成员,fd再内部 157 | { 158 | if(_events[ix].events & EPOLLIN)//struct epoll_event内部成员events ??? 159 | handleConnection(); 160 | }else if(_events[ix].data.fd == _eventfd){ 161 | handleRead(); 162 | doPendingFunctors(); 163 | }else{ 164 | if(_events[ix].events & EPOLLIN) 165 | handleMessage(_events[ix].data.fd); 166 | } 167 | } 168 | } 169 | } 170 | 171 | void EpollPoller::handleRead() 172 | { 173 | uint64_t buff=0; 174 | int ret=::read(_eventfd,&buff,sizeof(buff)); 175 | if(ret != sizeof(buff)){ 176 | LogError("read eventfd error!"); 177 | } 178 | } 179 | 180 | void EpollPoller::runInLoop(Function cb) 181 | { 182 | { 183 | MutexLockGuard guard(_mutex); 184 | _pendingFunctors.push_back(cb); 185 | } 186 | wakeup(); 187 | } 188 | 189 | void EpollPoller::wakeup() 190 | { 191 | uint64_t one=1; 192 | int ret=::write(_eventfd,&one,sizeof(one)); 193 | if(ret!=sizeof(one)){ 194 | LogError("reaad eventfd error!"); 195 | } 196 | } 197 | 198 | void EpollPoller::doPendingFunctors() 199 | { 200 | //printf("> doPendingFunctors()\n"); 201 | std::vector tmp; 202 | { 203 | MutexLockGuard guard(_mutex); 204 | tmp.swap(_pendingFunctors); 205 | } 206 | 207 | for(auto & func:tmp){ 208 | if(func) 209 | func(); 210 | } 211 | } 212 | 213 | void EpollPoller::handleConnection() 214 | { 215 | int peerfd = acceptConnFd(_listenfd); 216 | addEpollReadFd(_epollfd, peerfd); 217 | 218 | //多?? 219 | std::pair ret; 220 | 221 | TcpConnectionPtr conn(new TcpConnection(peerfd,this)); 222 | conn->setConnectCallback(_onConnectCallback); 223 | conn->setMessageCallback(_onMessageCallback); 224 | conn->setCloseCallback(_onCloseCallback); 225 | 226 | ret = _lists.insert(std::make_pair(peerfd, conn)); 227 | assert(ret.second == true); //断言插入成功 228 | (void)ret; //消除ret 未使用的warning ????? 229 | 230 | conn->handleConnectCallback(); 231 | } 232 | 233 | void EpollPoller::handleMessage(int peerfd) 234 | { 235 | bool isClosed = isConnectionClosed(peerfd); 236 | ConnectionList::iterator it = _lists.find(peerfd); 237 | //断言 238 | assert(it != _lists.end()); 239 | 240 | if(isClosed) 241 | { 242 | //调用conn的close事件handleCloseCalback 243 | it->second->handleCloseCallback(); 244 | delEpollReadFd(_epollfd, peerfd); 245 | _lists.erase(it); 246 | } 247 | else 248 | { 249 | it->second->handleMessageCallback(); 250 | } 251 | } 252 | 253 | void EpollPoller::loop() 254 | { 255 | _isLooping = true; 256 | 257 | while(_isLooping){ 258 | waitEpollFd(); 259 | } 260 | 261 | LogInfo("Loop quit safely!"); 262 | } 263 | 264 | void EpollPoller::unloop() 265 | { 266 | _isLooping = false; 267 | } 268 | 269 | } 270 | -------------------------------------------------------------------------------- /src/net/InetAddress.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file InetAddress.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include "InetAddress.hpp" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace yangyu 15 | { 16 | //?????????????? 17 | static_assert(sizeof(InetAddress) == sizeof(struct sockaddr_in), "InetAddress Error"); 18 | 19 | InetAddress::InetAddress(unsigned short port) 20 | { 21 | bzero(&_addr,sizeof _addr); 22 | _addr.sin_family = AF_INET; 23 | _addr.sin_addr.s_addr = INADDR_ANY; 24 | _addr.sin_port = htons(port); 25 | } 26 | 27 | InetAddress::InetAddress(const string &ip, unsigned short port) 28 | { 29 | bzero(&_addr,sizeof _addr); 30 | _addr.sin_family = AF_INET; 31 | _addr.sin_port = htons(port); 32 | if(inet_aton(ip.c_str(), &_addr.sin_addr) == 0) //新方法 33 | { 34 | LogError("stderr ip invalid!"); 35 | exit(EXIT_FAILURE); 36 | } 37 | } 38 | 39 | InetAddress::InetAddress(const struct sockaddr_in &addr) 40 | :_addr(addr) 41 | { } 42 | 43 | string InetAddress::toIp() const 44 | { 45 | return inet_ntoa(_addr.sin_addr);//字符串 46 | } 47 | 48 | unsigned short InetAddress::toPort() const 49 | { 50 | return ntohs(_addr.sin_port); 51 | } 52 | 53 | const struct sockaddr_in * InetAddress::getSockAddrInet()const 54 | { 55 | return & _addr; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/net/SockIO.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file SockIO.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "SockIO.hpp" 6 | #include 7 | #include 8 | #include 9 | 10 | namespace yangyu 11 | { 12 | 13 | ssize_t SocketIO::readn(char *buf, size_t count) 14 | { 15 | size_t nleft = count; //剩余的字节数 16 | ssize_t nread; //用作返回值 17 | char *bufp = (char*)buf; //缓冲区的偏移 18 | while(nleft > 0) 19 | { 20 | nread = ::read(_sockfd, bufp, nleft); 21 | if(nread == -1){ 22 | if(errno == EINTR) 23 | continue; 24 | return -1; // ERROR 25 | }else if(nread == 0) //EOF 26 | break; 27 | nleft -= nread; 28 | bufp += nread; 29 | } 30 | return (count - nleft); 31 | } 32 | 33 | ssize_t SocketIO::writen(const char *buf, size_t count) 34 | { 35 | size_t nleft = count; 36 | ssize_t nwrite; 37 | const char *bufp = buf; 38 | while(nleft > 0) 39 | { 40 | nwrite = ::write(_sockfd, bufp, nleft); 41 | if(nwrite <= 0){ 42 | if(nwrite == -1 && errno == EINTR) 43 | continue; 44 | return -1; 45 | } 46 | nleft -= nwrite; 47 | bufp += nwrite; 48 | } 49 | return count; 50 | } 51 | 52 | //预览内核缓冲区数据 53 | ssize_t SocketIO::recv_peek(char *buf, size_t len) 54 | { 55 | int nread; 56 | do{ 57 | nread = ::recv(_sockfd, buf, len, MSG_PEEK); 58 | }while(nread == -1 && errno == EINTR); 59 | 60 | return nread; 61 | } 62 | 63 | ssize_t SocketIO::readline(char *usrbuf, size_t maxlen) 64 | { 65 | size_t nleft = maxlen - 1; 66 | char *bufp = usrbuf; //缓冲区位置 67 | size_t total = 0; //读取的字节数 68 | ssize_t nread; 69 | while(nleft > 0) 70 | { 71 | //预读取 72 | nread = recv_peek(bufp, nleft); 73 | if(nread <= 0) 74 | return nread; 75 | 76 | //检查\n 77 | int i; 78 | for(i = 0; i < nread; ++i) 79 | { 80 | if(bufp[i] == '\n') 81 | { 82 | //找到\n 83 | size_t nsize = i+1; 84 | if(readn(bufp, nsize) != static_cast(nsize)) 85 | return -1; 86 | bufp += nsize; 87 | total += nsize; 88 | *bufp = 0; 89 | return total; 90 | } 91 | } 92 | 93 | //没找到\n 94 | if(readn(bufp, nread) != nread) 95 | return -1; 96 | bufp += nread; 97 | total += nread; 98 | nleft -= nread; 99 | } 100 | *bufp = 0; 101 | return maxlen - 1; 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/net/Socket.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Socket.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Socket.hpp" 6 | #include "Log4func.hpp" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | namespace yangyu 21 | { 22 | 23 | Socket::Socket(int sockfd) 24 | :_sockfd(sockfd) 25 | { } 26 | 27 | Socket::~Socket() 28 | { 29 | ::close(_sockfd); 30 | } 31 | 32 | #if 0//tcpserver类在main.cc中完成此部分工作 33 | void Socket::ready(const InetAddress &inetAddr) 34 | { 35 | setReuseAddr(true); 36 | setReusePort(true); 37 | setKeepAlive(false); 38 | setTcpNoDelay(false); 39 | bindAddress(inetAddr); 40 | listen(); 41 | } 42 | #endif 43 | void Socket::bindAddress(const InetAddress &addr) 44 | { 45 | if(::bind(_sockfd, (SA*)addr.getSockAddrInet(), sizeof(addr)) == -1) 46 | { 47 | LogError("stderr bind address error!"); 48 | exit(EXIT_FAILURE); 49 | } 50 | } 51 | 52 | int Socket::accept() 53 | { 54 | int fd = ::accept(_sockfd, NULL, NULL);//新方法 55 | if(fd == -1){ 56 | LogError("stderr accept error!"); 57 | exit(EXIT_FAILURE); 58 | } 59 | return fd; 60 | } 61 | 62 | void Socket::shutdownWrite() 63 | { 64 | if(::shutdown(_sockfd, SHUT_WR) == -1) 65 | { 66 | LogError("stderr shutdown error!"); 67 | exit(EXIT_FAILURE); 68 | } 69 | } 70 | 71 | void Socket::setTcpNoDelay(bool on) 72 | { 73 | int optval = on ? 1 : 0; 74 | if(::setsockopt(_sockfd, //???????? 75 | IPPROTO_TCP, 76 | TCP_NODELAY, 77 | &optval, 78 | static_cast(sizeof optval)) == -1) 79 | { 80 | LogError("stderr setTcpNoDelay error!"); 81 | exit(EXIT_FAILURE); 82 | } 83 | } 84 | 85 | void Socket::setReuseAddr(bool on) 86 | { 87 | int optval = on ? 1 : 0; 88 | if(::setsockopt(_sockfd, 89 | SOL_SOCKET, 90 | SO_REUSEADDR, 91 | &optval, 92 | static_cast(sizeof optval)) == -1) 93 | { 94 | LogError("stderr setTcpNoDelay error!"); 95 | exit(EXIT_FAILURE); 96 | } 97 | } 98 | 99 | //?????????????? 100 | void Socket::setReusePort(bool on) 101 | { 102 | #ifdef SO_REUSEPORT 103 | int optval = on ? 1 : 0; 104 | int ret = ::setsockopt(_sockfd,SOL_SOCKET,SO_REUSEADDR,&optval, 105 | static_cast(sizeof optval)); 106 | if(ret < 0){ 107 | LogError("stderr setTcpNoDelay error!"); 108 | exit(EXIT_FAILURE); 109 | } 110 | #else 111 | if(on) 112 | LogError("stderr SO_REUSEPORT is not supported!"); 113 | #endif 114 | } 115 | 116 | void Socket::setKeepAlive(bool on) 117 | { 118 | int optval = on ? 1 : 0; 119 | if(::setsockopt(_sockfd, 120 | SOL_SOCKET, 121 | SO_KEEPALIVE, 122 | &optval, 123 | static_cast(sizeof optval)) == -1) 124 | { 125 | LogError("stderr setTcpNoDelay error!"); 126 | exit(EXIT_FAILURE); 127 | } 128 | } 129 | 130 | InetAddress Socket::getLocalAddr(int sockfd) 131 | { 132 | struct sockaddr_in addr; 133 | socklen_t len = sizeof addr; 134 | if(::getsockname(sockfd, (SA*)&addr, &len) == -1)//????????????? 135 | { 136 | LogError("stderr getLocalAddress!"); 137 | exit(EXIT_FAILURE); 138 | } 139 | return InetAddress(addr);//返回本身,this指针 140 | } 141 | 142 | InetAddress Socket::getPeerAddr(int sockfd) 143 | { 144 | struct sockaddr_in addr; 145 | socklen_t len = sizeof addr; 146 | if(::getpeername(sockfd, (SA*)&addr, &len) == -1)//????????????? 147 | { 148 | LogError("stderr getPeerAddress!"); 149 | exit(EXIT_FAILURE); 150 | } 151 | return InetAddress(addr);//返回本身,this指针 152 | } 153 | 154 | void Socket::listen() 155 | { 156 | if(::listen(_sockfd, 5) == -1) 157 | { 158 | LogError("stderr listen address error!"); 159 | exit(EXIT_FAILURE); 160 | } 161 | } 162 | 163 | int Socket::fd() const 164 | { 165 | return _sockfd; 166 | } 167 | 168 | } 169 | -------------------------------------------------------------------------------- /src/net/TcpConnection.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file TcpConnection.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include "TcpConnection.hpp" 7 | #include "EpollPoller.hpp" 8 | 9 | namespace yangyu 10 | { 11 | 12 | TcpConnection::TcpConnection(int sockfd,EpollPoller *p) 13 | : _sockfd(sockfd) 14 | ,_sockIO(sockfd) 15 | ,_localAddr(Socket::getLocalAddr(sockfd)) 16 | ,_peerAddr(Socket::getPeerAddr(sockfd)) 17 | ,_isShutdownWrite(false) 18 | ,_epollPoller(p) 19 | { } 20 | 21 | TcpConnection::~TcpConnection() 22 | { 23 | if(!_isShutdownWrite) 24 | { 25 | shutdown(); 26 | } 27 | } 28 | 29 | //conn->handleConnectCalback() 30 | #if 1 31 | void TcpConnection::handleConnectCallback() 32 | { 33 | if(onConnectCallback_) 34 | { 35 | onConnectCallback_(shared_from_this()); 36 | } 37 | } 38 | 39 | void TcpConnection::handleMessageCallback() 40 | { 41 | if(onMessageCallback_) 42 | { 43 | onMessageCallback_(shared_from_this()); 44 | } 45 | } 46 | 47 | void TcpConnection::handleCloseCallback() 48 | { 49 | if(onCloseCallback_) 50 | { 51 | onCloseCallback_(shared_from_this()); 52 | } 53 | } 54 | #endif 55 | 56 | ssize_t TcpConnection::readn(char *buf, size_t count) 57 | { 58 | ssize_t ret = _sockIO.readn(buf, count); 59 | if(ret == -1) 60 | { 61 | LogError("stderr TcpConnection readn!"); 62 | exit(EXIT_FAILURE); 63 | } 64 | return ret; 65 | } 66 | 67 | ssize_t TcpConnection::writen(const char *buf, size_t count) 68 | { 69 | ssize_t ret = _sockIO.writen(buf, count); 70 | if(ret == -1) 71 | { 72 | LogError("stderr TcpConnection writen!"); 73 | exit(EXIT_FAILURE); 74 | } 75 | return ret; 76 | } 77 | 78 | ssize_t TcpConnection::readLine(char *usrbuf, size_t maxlen) 79 | { 80 | ssize_t ret = _sockIO.readline(usrbuf, maxlen); 81 | if(ret == -1) 82 | { 83 | LogError("stderr TcpConnection readLine!"); 84 | exit(EXIT_FAILURE); 85 | } 86 | return ret; 87 | } 88 | 89 | std::string TcpConnection::receive() 90 | { 91 | char str[65535] = {0};//64kB 92 | int ret = readLine(str, sizeof str); 93 | if(ret == 0) 94 | return std::string(); 95 | else 96 | return std::string(str); 97 | } 98 | 99 | void TcpConnection::send(const std::string &s) 100 | { 101 | writen(s.c_str(), s.size()); 102 | } 103 | 104 | void TcpConnection::sendInLoop(const std::string &s) 105 | { 106 | _epollPoller->runInLoop(std::bind(&TcpConnection::send,shared_from_this(),s)); 107 | } 108 | 109 | std::string TcpConnection::toString() const 110 | { 111 | char text[100]; 112 | snprintf(text, sizeof text, "%s:%d -> %s:%d", 113 | _localAddr.toIp().c_str(), 114 | _localAddr.toPort(), 115 | _peerAddr.toIp().c_str(), 116 | _peerAddr.toPort()); 117 | 118 | return text; 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /src/net/TcpServer.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file TcpSever.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Log4func.hpp" 6 | #include "TcpServer.hpp" 7 | 8 | namespace yangyu 9 | { 10 | 11 | int createSocketFd() 12 | { 13 | int fd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);//???????????? 14 | if(fd == -1) 15 | { 16 | LogError("stderr create socket fd error!"); 17 | exit(EXIT_FAILURE); 18 | } 19 | 20 | return fd; 21 | } 22 | 23 | TcpServer::TcpServer(const string & ip, unsigned short port) 24 | : _addr(ip, port) 25 | , _sockfd(createSocketFd()) 26 | , _poller(_sockfd.fd()) 27 | { 28 | _sockfd.setTcpNoDelay(false); 29 | _sockfd.setReusePort(true); 30 | _sockfd.setReuseAddr(true); 31 | _sockfd.setKeepAlive(false); 32 | 33 | _sockfd.bindAddress(_addr); 34 | _sockfd.listen(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/threadpool/Buffer.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Buffer.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Buffer.hpp" 6 | #include "MutexLock.hpp" 7 | 8 | namespace yangyu 9 | { 10 | 11 | Buffer::Buffer(size_t size) 12 | :_mutex() 13 | ,_notFull(_mutex) 14 | ,_notEmpty(_mutex) 15 | ,_size(size) 16 | ,_flag(true) 17 | { } 18 | 19 | bool Buffer::full() 20 | { return _que.size()==_size; } 21 | 22 | bool Buffer::empty() 23 | { return _que.size()==0; } 24 | 25 | //运行于生产者线程 26 | void Buffer::push(ElemType elem) 27 | { 28 | MutexLockGuard guard(_mutex);//不能创建临时变量,避免异常退出导致死锁 29 | while(full()) //while 代替 if可避免条件变量被异常唤醒 30 | _notFull.wait(); 31 | _que.push(elem); 32 | _notEmpty.notify(); 33 | } 34 | 35 | //运行于消费者线程 36 | ElemType Buffer::pop() 37 | { 38 | MutexLockGuard guard(_mutex);//不能创建临时变量,避免异常退出导致死锁 39 | while(_flag && empty()) 40 | _notEmpty.wait(); 41 | 42 | if(_flag){ 43 | ElemType ret = _que.front(); 44 | _que.pop(); 45 | _notFull.notify(); 46 | return ret; 47 | }else 48 | return NULL; 49 | } 50 | 51 | void Buffer::wakeup() 52 | { 53 | _flag = false; 54 | _notEmpty.notifyall(); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/threadpool/Condition.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Condition.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Condition.hpp" 6 | #include "MutexLock.hpp" 7 | 8 | namespace yangyu 9 | { 10 | 11 | Condition::Condition(MutexLock &mutex) 12 | :_mutex(mutex) 13 | { pthread_cond_init(&_cond,NULL); } 14 | 15 | Condition::~Condition() 16 | { pthread_cond_destroy(&_cond); } 17 | 18 | void Condition::wait() 19 | { pthread_cond_wait(&_cond,_mutex.getMutexLockPtr()); } 20 | 21 | void Condition::notify() 22 | { pthread_cond_signal(&_cond); } 23 | 24 | void Condition::notifyall() 25 | { pthread_cond_broadcast(&_cond); } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/threadpool/MutexLock.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file MutexLock.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "MutexLock.hpp" 6 | 7 | //头文件定义有MutexLockGuard类 8 | 9 | namespace yangyu 10 | { 11 | 12 | MutexLock::MutexLock() 13 | :_islocking(false) 14 | { 15 | pthread_mutex_init(&_mutex,NULL); 16 | } 17 | 18 | MutexLock::~MutexLock() 19 | { pthread_mutex_destroy(&_mutex); } 20 | 21 | void MutexLock::lock() 22 | { 23 | pthread_mutex_lock(&_mutex); 24 | _islocking=true; 25 | } 26 | 27 | void MutexLock::unlock() 28 | { 29 | pthread_mutex_unlock(&_mutex); 30 | _islocking=false; 31 | } 32 | 33 | bool MutexLock::status()const 34 | { return _islocking; } 35 | 36 | pthread_mutex_t * MutexLock::getMutexLockPtr() 37 | { return & _mutex; } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/threadpool/Pthread.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Pthread.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Pthread.hpp" 6 | #include 7 | using std::cout; 8 | using std::endl; 9 | 10 | namespace yangyu 11 | { 12 | 13 | Thread::Thread(ThreadCallback cb) 14 | :_pthId(0) 15 | ,_isRunning(false) 16 | ,_cb(cb) 17 | { } 18 | 19 | void Thread::start() 20 | { 21 | pthread_create(&_pthId,NULL,threadFunc,this); 22 | _isRunning = true; 23 | } 24 | 25 | void Thread::join() 26 | { 27 | if(_isRunning){ 28 | pthread_join(_pthId,NULL); 29 | _isRunning = false; 30 | } 31 | } 32 | 33 | void * Thread::threadFunc(void* arg) 34 | { 35 | Thread* p=static_cast(arg); 36 | if(p) 37 | p->_cb(); 38 | return NULL; 39 | } 40 | 41 | Thread::~Thread() 42 | { 43 | //LogInfo("Thread::~Thread()."); 44 | if(_isRunning){ 45 | pthread_detach(_pthId);//资源回收交给主线程进行托管 46 | _isRunning=false; 47 | } 48 | } 49 | 50 | pthread_t Thread::getId() 51 | { 52 | return pthread_self(); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/threadpool/Threadpool.cpp: -------------------------------------------------------------------------------- 1 | /// 2 | /// @file Threadpool.cpp 3 | /// @author https://icoty.github.io 4 | /// 5 | #include "Threadpool.hpp" 6 | 7 | #include 8 | 9 | namespace yangyu 10 | { 11 | 12 | Threadpool::Threadpool(size_t threadNum,size_t bufSize) 13 | :_isExit(false) 14 | ,_threadNum(threadNum) 15 | ,_bufSize(bufSize) 16 | ,_buff(_bufSize) 17 | { 18 | _threads.reserve(_threadNum); 19 | } 20 | 21 | void Threadpool::start() 22 | { 23 | for(size_t idx = 0;idx != _threadNum;++idx) 24 | { 25 | shared_ptr sp(new Thread(std::bind(&Threadpool::processTask, this))); 26 | _threads.push_back(sp); 27 | sp->start(); 28 | } 29 | } 30 | 31 | Threadpool::~Threadpool() 32 | { 33 | if(!_isExit) 34 | stop(); 35 | } 36 | 37 | void Threadpool::stop() 38 | { 39 | if(!_isExit) 40 | { 41 | //等待任务队列内的任务执行结束 42 | while(!_buff.empty()) 43 | sleep(1); 44 | 45 | _isExit=true;//任务队列执行结束后标志线程池退出 46 | _buff.wakeup(); 47 | for(auto & ele:_threads) 48 | ele->join(); 49 | } 50 | } 51 | 52 | void Threadpool::addTask(Task task) 53 | { 54 | _buff.push(task); 55 | } 56 | 57 | Task Threadpool::getTask() 58 | { 59 | return _buff.pop(); 60 | } 61 | 62 | void Threadpool::processTask() 63 | { 64 | while(!_isExit) 65 | { 66 | Task task=getTask(); 67 | if(task) 68 | task(); 69 | } 70 | } 71 | 72 | } 73 | --------------------------------------------------------------------------------