├── .vscode ├── configurationCache.log ├── dryrun.log ├── settings.json └── targets.log ├── CMakeLists.txt ├── README.md ├── bin ├── ChatClient └── ChatServer ├── build.sh ├── build ├── CMakeCache.txt ├── CMakeFiles │ ├── 3.10.2 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.out │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.out │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── Makefile.cmake │ ├── Makefile2 │ ├── TargetDirectories.txt │ ├── cmake.check_cache │ ├── feature_tests.bin │ ├── feature_tests.c │ ├── feature_tests.cxx │ └── progress.marks ├── Makefile ├── cmake_install.cmake ├── compile_commands.json └── src │ ├── CMakeFiles │ ├── CMakeDirectoryInformation.cmake │ └── progress.marks │ ├── Makefile │ ├── client │ ├── CMakeFiles │ │ ├── CMakeDirectoryInformation.cmake │ │ ├── ChatClient.dir │ │ │ ├── CXX.includecache │ │ │ ├── DependInfo.cmake │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ ├── depend.internal │ │ │ ├── depend.make │ │ │ ├── flags.make │ │ │ ├── link.txt │ │ │ ├── main.cpp.o │ │ │ └── progress.make │ │ └── progress.marks │ ├── Makefile │ └── cmake_install.cmake │ ├── cmake_install.cmake │ └── server │ ├── CMakeFiles │ ├── CMakeDirectoryInformation.cmake │ ├── ChatServer.dir │ │ ├── CXX.includecache │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── chatserver.cpp.o │ │ ├── chatservice.cpp.o │ │ ├── cmake_clean.cmake │ │ ├── db │ │ │ └── db.cpp.o │ │ ├── depend.internal │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ ├── main.cpp.o │ │ ├── model │ │ │ ├── friendmodel.cpp.o │ │ │ ├── groupmodel.cpp.o │ │ │ ├── offlinemessagemodel.cpp.o │ │ │ └── usermodel.cpp.o │ │ ├── progress.make │ │ └── redis │ │ │ └── redis.cpp.o │ └── progress.marks │ ├── Makefile │ └── cmake_install.cmake ├── chat.sql ├── include ├── public.hpp └── server │ ├── chatserver.hpp │ ├── chatservice.hpp │ ├── db │ └── db.h │ ├── model │ ├── friendmodel.hpp │ ├── group.hpp │ ├── group_model.hpp │ ├── group_user.hpp │ ├── offlinemessagemodel.hpp │ ├── user.hpp │ └── usermodel.hpp │ └── redis │ └── redis.hpp ├── src ├── CMakeLists.txt ├── client │ ├── CMakeLists.txt │ └── main.cpp └── server │ ├── CMakeLists.txt │ ├── chatserver.cpp │ ├── chatservice.cpp │ ├── db │ └── db.cpp │ ├── main.cpp │ ├── model │ ├── friendmodel.cpp │ ├── groupmodel.cpp │ ├── offlinemessagemodel.cpp │ └── usermodel.cpp │ └── redis │ └── redis.cpp └── thidrparty └── json.hpp /.vscode/configurationCache.log: -------------------------------------------------------------------------------- 1 | {"buildTargets":[],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} -------------------------------------------------------------------------------- /.vscode/dryrun.log: -------------------------------------------------------------------------------- 1 | make --dry-run --always-make --keep-going --print-directory 2 | make: Entering directory '/home/shang/code/C++/github/Cluster-Server-Chat' 3 | make: Leaving directory '/home/shang/code/C++/github/Cluster-Server-Chat' 4 | 5 | make: *** No targets specified and no makefile found. Stop. 6 | 7 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "iostream": "cpp", 4 | "ostream": "cpp", 5 | "cctype": "cpp", 6 | "clocale": "cpp", 7 | "cmath": "cpp", 8 | "cstdarg": "cpp", 9 | "cstddef": "cpp", 10 | "cstdio": "cpp", 11 | "cstdlib": "cpp", 12 | "cstring": "cpp", 13 | "cwchar": "cpp", 14 | "cwctype": "cpp", 15 | "array": "cpp", 16 | "atomic": "cpp", 17 | "*.tcc": "cpp", 18 | "cstdint": "cpp", 19 | "deque": "cpp", 20 | "forward_list": "cpp", 21 | "unordered_map": "cpp", 22 | "vector": "cpp", 23 | "exception": "cpp", 24 | "algorithm": "cpp", 25 | "functional": "cpp", 26 | "iterator": "cpp", 27 | "map": "cpp", 28 | "memory": "cpp", 29 | "memory_resource": "cpp", 30 | "numeric": "cpp", 31 | "optional": "cpp", 32 | "string": "cpp", 33 | "string_view": "cpp", 34 | "system_error": "cpp", 35 | "tuple": "cpp", 36 | "type_traits": "cpp", 37 | "utility": "cpp", 38 | "fstream": "cpp", 39 | "initializer_list": "cpp", 40 | "iosfwd": "cpp", 41 | "istream": "cpp", 42 | "limits": "cpp", 43 | "new": "cpp", 44 | "sstream": "cpp", 45 | "stdexcept": "cpp", 46 | "streambuf": "cpp", 47 | "typeinfo": "cpp", 48 | "valarray": "cpp", 49 | "bitset": "cpp", 50 | "complex": "cpp", 51 | "list": "cpp", 52 | "set": "cpp", 53 | "cinttypes": "cpp", 54 | "typeindex": "cpp", 55 | "chrono": "cpp", 56 | "condition_variable": "cpp", 57 | "ctime": "cpp", 58 | "mutex": "cpp", 59 | "ratio": "cpp", 60 | "thread": "cpp", 61 | "unordered_set": "cpp" 62 | } 63 | } -------------------------------------------------------------------------------- /.vscode/targets.log: -------------------------------------------------------------------------------- 1 | make all --print-data-base --no-builtin-variables --no-builtin-rules --question 2 | make: *** No rule to make target 'all'. Stop. 3 | 4 | # GNU Make 4.1 5 | # Built for x86_64-pc-linux-gnu 6 | # Copyright (C) 1988-2014 Free Software Foundation, Inc. 7 | # License GPLv3+: GNU GPL version 3 or later 8 | # This is free software: you are free to change and redistribute it. 9 | # There is NO WARRANTY, to the extent permitted by law. 10 | 11 | # Make data base, printed on Mon Aug 1 23:17:51 2022 12 | 13 | # Variables 14 | 15 | # automatic 16 | retrieveAllAsString(); 117 | json js = json::parse(buf); 118 | 119 | // 业务模块和网络模块解耦 120 | auto msgHandler = ChatService::instance()->getHandler(js["msgid"].get()); 121 | // 回调消息绑定好的事件处理器,来执行相应的业务处理 122 | msgHandler(conn, js, time); 123 | } 124 | ``` 125 | 126 | ## 业务模块设计 127 | 128 | ### 注册模块 129 | 130 | 我们从网络模块接收数据,根据 `MSGID` 定位到注册模块。从传递过来的 `json` 对象中获取用户 ID 和用户密码。并以此生成 `User` 对象,调用 model 层方法将新生成的 `User` 插入到数据库中。 131 | 132 | ### 登录模块 133 | 134 | 从 `json` 对象中获取用户ID和密码,并在数据库中查询获取用户信息是否匹配。如果用户已经登录过,即 `state == "online"`,则返回错误信息。登录成功后需要在改服务端的用户表中记录登录用户,并显示该用户的好友列表和收到的离线消息。 135 | 136 | ### 客户端异常退出模块 137 | 138 | 如果客户端异常退出了,我们会从服务端记录用户连接的表中找到该用户,如果它断连了就从此表中删除,并设置其状态为 `offline`。 139 | 140 | ### 服务端异常退出模块 141 | 142 | 如果服务端异常退出,它会将所有在线的客户的状态都设置为 `offline`。即,让所有用户都下线。异常退出一般是 `CTRL + C` 时,我们需要捕捉信号。这里使用了 Linux 的信号处理函数,我们向信号注册回调函数,然后在函数内将所有用户置为下线状态。 143 | 144 | ### 点对点聊天模块 145 | 146 | 通过传递的 `json` 查找对话用户 ID: 147 | 148 | - 用户处于登录状态:直接向该用户发送信息 149 | - 用户处于离线状态:需存储离线消息 150 | 151 | ### 添加好友模块 152 | 153 | 从 `json` 对象中获取添加登录用户 ID 和其想添加的好友的 ID,调用 model 层代码在 friend 表中插入好友信息。 154 | 155 | ### 群组模块 156 | 157 | 创建群组需要描述群组名称,群组的描述,然后调用 model 层方法在数据库中记录新群组信息。 158 | 加入群组需要给出用户 ID 和想要加入群组的 ID,其中会显示该用户是群组的普通成员还是创建者。 159 | 群组聊天给出群组 ID 和聊天信息,群内成员在线会直接接收到。 160 | 161 | ## 使用Nginx负载均衡模块 162 | 163 | ### 负载均衡是什么 164 | 165 | 假设一台机器支持两万的并发量,现在我们需要保证八万的并发量。首先想到的是升级服务器的配置,比如提高 CPU 执行频率,加大内存等提高机器的物理性能来解决此问题。但是单台机器的性能毕竟是有限的,而且也有着摩尔定律也日已失效。 166 | 167 | 这个时候我们就可以增加服务器的数量,将用户请求分发到不同的服务器上分担压力,这就是负载均衡。那我们就需要有一个第三方组件充当负载均衡器,由它负责将不同的请求分发到不同的服务器上。而本项目,我们选择 `Nginx` 的负载均衡功能。 168 | 169 | ![](https://cdn.nlark.com/yuque/0/2022/png/26752078/1663746624651-351f9bcb-4ed5-40cd-9f2f-1b72c9964316.png#crop=0&crop=0&crop=1&crop=1&from=url&id=i9BRn&margin=%5Bobject%20Object%5D&originHeight=494&originWidth=967&originalType=binary&ratio=1&rotation=0&showTitle=false&status=done&style=none&title=) 170 | 171 | 选择 `Nginx` 的 `tcp` 负载均衡模块的原因: 172 | 173 | 1. 把`client`的请求按照负载算法分发到具体的业务服务器`ChatServer`上 174 | 2. 能够`ChantServer`保持心跳机制,检测`ChatServer`故障 175 | 3. 能够发现新添加的`ChatServer`设备,方便扩展服务器数量 176 | 177 | ### 配置负载均衡 178 | 179 | ![](https://cdn.nlark.com/yuque/0/2022/png/26752078/1663732379258-4c925576-3374-4f0d-8274-6031a8366536.png#crop=0&crop=0&crop=1&crop=1&from=url&id=ARrJw&margin=%5Bobject%20Object%5D&originHeight=402&originWidth=810&originalType=binary&ratio=1&rotation=0&showTitle=false&status=done&style=none&title=) 180 | 181 | 配置好后,重新加载配置文件启动。 182 | 183 | ```shell 184 | /usr/local/nginx/sbin/nginx -s reload 185 | ``` 186 | 187 | ## redis发布-订阅功能解决跨服务器通信问题 188 | 189 | ### 如何保证支持跨服务器通信 190 | 191 | 我们之前的`ChatServer`是维护了一个连接的用户表,每次向别的用户发消息都会从用户表中查看对端用户是否在线。然后再判断是直接发送,还是转为离线消息。 192 | 193 | 但是现在我们是集群服务器,有多个服务器维护用户。我们的`ChatServerA`要聊天的对象在`ChatServerB`,`ChatServerA`在自己服务器的用户表中找不到。那么可能对端用户在线,它却给对端用户发送了离线消息。因此,我们需要保证跨服务器间的通信!那我们如何实现,非常直观的想法,我们可以让后端的服务器之间互相连接。 194 | 195 | ![](https://cdn.nlark.com/yuque/0/2022/png/26752078/1663747492823-3d6b305d-0008-4fce-a1fa-4683f1800adb.png#crop=0&crop=0&crop=1&crop=1&from=url&id=RU1j6&margin=%5Bobject%20Object%5D&originHeight=554&originWidth=698&originalType=binary&ratio=1&rotation=0&showTitle=false&status=done&style=none&title=) 196 | 197 | 上面的设计,让各个ChatServer服务器互相之间直接建立TCP连接进行通信,相当于在服务器网络之间进行广播。这样的设计使得各个服务器之间耦合度太高,不利于系统扩展,并且会占用系统大量的socket资源,各服务器之间的带宽压力很大,不能够节省资源给更多的客户端提供服务,因此绝对不是一个好的设计。 198 | 199 | 集群部署的服务器之间进行通信,最好的方式就是引入中间件消息队列,解耦各个服务器,使整个系统松耦合,提高服务器的响应能力,节省服务器的带宽资源,如下图所示: 200 | 201 | ![](https://cdn.nlark.com/yuque/0/2022/png/26752078/1663747534358-10e307b4-95c8-43f3-8dc2-5deed9893f1c.png#crop=0&crop=0&crop=1&crop=1&from=url&id=QproC&margin=%5Bobject%20Object%5D&originHeight=505&originWidth=619&originalType=binary&ratio=1&rotation=0&showTitle=false&status=done&style=none&title=) 202 | 203 | # 详细记录 204 | 205 | -------------------------------------------------------------------------------- /bin/ChatClient: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/bin/ChatClient -------------------------------------------------------------------------------- /bin/ChatServer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/bin/ChatServer -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | 3 | rm -rf `pwd`/build/* 4 | cd `pwd`/build && 5 | cmake .. && 6 | make -------------------------------------------------------------------------------- /build/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Path to a program. 18 | CMAKE_AR:FILEPATH=/usr/bin/ar 19 | 20 | //No help, variable specified on the command line. 21 | CMAKE_BUILD_TYPE:STRING=Debug 22 | 23 | //Enable/Disable color output during build. 24 | CMAKE_COLOR_MAKEFILE:BOOL=ON 25 | 26 | //No help, variable specified on the command line. 27 | CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/x86_64-linux-gnu-g++-7 28 | 29 | //A wrapper around 'ar' adding the appropriate '--plugin' option 30 | // for the GCC compiler 31 | CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 32 | 33 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 34 | // for the GCC compiler 35 | CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 36 | 37 | //Flags used by the compiler during all build types. 38 | CMAKE_CXX_FLAGS:STRING= 39 | 40 | //Flags used by the compiler during debug builds. 41 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 42 | 43 | //Flags used by the compiler during release builds for minimum 44 | // size. 45 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 46 | 47 | //Flags used by the compiler during release builds. 48 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 49 | 50 | //Flags used by the compiler during release builds with debug info. 51 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 52 | 53 | //No help, variable specified on the command line. 54 | CMAKE_C_COMPILER:FILEPATH=/usr/bin/x86_64-linux-gnu-gcc-7 55 | 56 | //A wrapper around 'ar' adding the appropriate '--plugin' option 57 | // for the GCC compiler 58 | CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 59 | 60 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 61 | // for the GCC compiler 62 | CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 63 | 64 | //Flags used by the compiler during all build types. 65 | CMAKE_C_FLAGS:STRING= 66 | 67 | //Flags used by the compiler during debug builds. 68 | CMAKE_C_FLAGS_DEBUG:STRING=-g 69 | 70 | //Flags used by the compiler during release builds for minimum 71 | // size. 72 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 73 | 74 | //Flags used by the compiler during release builds. 75 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 76 | 77 | //Flags used by the compiler during release builds with debug info. 78 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 79 | 80 | //Flags used by the linker. 81 | CMAKE_EXE_LINKER_FLAGS:STRING= 82 | 83 | //Flags used by the linker during debug builds. 84 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 85 | 86 | //Flags used by the linker during release minsize builds. 87 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 88 | 89 | //Flags used by the linker during release builds. 90 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 91 | 92 | //Flags used by the linker during Release with Debug Info builds. 93 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 94 | 95 | //No help, variable specified on the command line. 96 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE 97 | 98 | //Install path prefix, prepended onto install directories. 99 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 100 | 101 | //Path to a program. 102 | CMAKE_LINKER:FILEPATH=/usr/bin/ld 103 | 104 | //Path to a program. 105 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 106 | 107 | //Flags used by the linker during the creation of modules. 108 | CMAKE_MODULE_LINKER_FLAGS:STRING= 109 | 110 | //Flags used by the linker during debug builds. 111 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 112 | 113 | //Flags used by the linker during release minsize builds. 114 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 115 | 116 | //Flags used by the linker during release builds. 117 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 118 | 119 | //Flags used by the linker during Release with Debug Info builds. 120 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 121 | 122 | //Path to a program. 123 | CMAKE_NM:FILEPATH=/usr/bin/nm 124 | 125 | //Path to a program. 126 | CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy 127 | 128 | //Path to a program. 129 | CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump 130 | 131 | //Value Computed by CMake 132 | CMAKE_PROJECT_NAME:STATIC=chat 133 | 134 | //Path to a program. 135 | CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib 136 | 137 | //Flags used by the linker during the creation of dll's. 138 | CMAKE_SHARED_LINKER_FLAGS:STRING= 139 | 140 | //Flags used by the linker during debug builds. 141 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 142 | 143 | //Flags used by the linker during release minsize builds. 144 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 145 | 146 | //Flags used by the linker during release builds. 147 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 148 | 149 | //Flags used by the linker during Release with Debug Info builds. 150 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 151 | 152 | //If set, runtime paths are not added when installing shared libraries, 153 | // but are added when building. 154 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 155 | 156 | //If set, runtime paths are not added when using shared libraries. 157 | CMAKE_SKIP_RPATH:BOOL=NO 158 | 159 | //Flags used by the linker during the creation of static libraries. 160 | CMAKE_STATIC_LINKER_FLAGS:STRING= 161 | 162 | //Flags used by the linker during debug builds. 163 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 164 | 165 | //Flags used by the linker during release minsize builds. 166 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 167 | 168 | //Flags used by the linker during release builds. 169 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 170 | 171 | //Flags used by the linker during Release with Debug Info builds. 172 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 173 | 174 | //Path to a program. 175 | CMAKE_STRIP:FILEPATH=/usr/bin/strip 176 | 177 | //If this value is on, makefiles will be generated without the 178 | // .SILENT directive, and all commands will be echoed to the console 179 | // during the make. This is useful for debugging only. With Visual 180 | // Studio IDE projects all commands are done without /nologo. 181 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 182 | 183 | //Value Computed by CMake 184 | chat_BINARY_DIR:STATIC=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 185 | 186 | //Value Computed by CMake 187 | chat_SOURCE_DIR:STATIC=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 188 | 189 | 190 | ######################## 191 | # INTERNAL cache entries 192 | ######################## 193 | 194 | //ADVANCED property for variable: CMAKE_AR 195 | CMAKE_AR-ADVANCED:INTERNAL=1 196 | //This is the directory where this CMakeCache.txt was created 197 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 198 | //Major version of cmake used to create the current loaded cache 199 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 200 | //Minor version of cmake used to create the current loaded cache 201 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=10 202 | //Patch version of cmake used to create the current loaded cache 203 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 204 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 205 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 206 | //Path to CMake executable. 207 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 208 | //Path to cpack program executable. 209 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 210 | //Path to ctest program executable. 211 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 212 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 213 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 214 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_AR 215 | CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 216 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB 217 | CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 218 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 219 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 220 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 221 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 222 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 223 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 224 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 225 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 226 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 227 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 228 | //ADVANCED property for variable: CMAKE_C_COMPILER 229 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 230 | //ADVANCED property for variable: CMAKE_C_COMPILER_AR 231 | CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 232 | //ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB 233 | CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 234 | //ADVANCED property for variable: CMAKE_C_FLAGS 235 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 236 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 237 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 238 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 239 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 240 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 241 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 242 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 243 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 244 | //Executable file format 245 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF 246 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 247 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 248 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 249 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 250 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 251 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 252 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 253 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 254 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 255 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 256 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 257 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 258 | //Name of external makefile project generator. 259 | CMAKE_EXTRA_GENERATOR:INTERNAL= 260 | //Name of generator. 261 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 262 | //Name of generator platform. 263 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 264 | //Name of generator toolset. 265 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 266 | //Source directory with the top level CMakeLists.txt file for this 267 | // project 268 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 269 | //Install .so files without execute permission. 270 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 271 | //ADVANCED property for variable: CMAKE_LINKER 272 | CMAKE_LINKER-ADVANCED:INTERNAL=1 273 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 274 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 275 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 276 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 277 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 278 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 279 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 280 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 281 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 282 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 283 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 284 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 285 | //ADVANCED property for variable: CMAKE_NM 286 | CMAKE_NM-ADVANCED:INTERNAL=1 287 | //number of local generators 288 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=4 289 | //ADVANCED property for variable: CMAKE_OBJCOPY 290 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 291 | //ADVANCED property for variable: CMAKE_OBJDUMP 292 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 293 | //Platform information initialized 294 | CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 295 | //ADVANCED property for variable: CMAKE_RANLIB 296 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 297 | //Path to CMake installation. 298 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.10 299 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 300 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 301 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 302 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 303 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 304 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 305 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 306 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 307 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 308 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 309 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 310 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 311 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 312 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 313 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 314 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 315 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 316 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 317 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 318 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 319 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 320 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 321 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 322 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 323 | //ADVANCED property for variable: CMAKE_STRIP 324 | CMAKE_STRIP-ADVANCED:INTERNAL=1 325 | //uname command 326 | CMAKE_UNAME:INTERNAL=/bin/uname 327 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 328 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 329 | 330 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/x86_64-linux-gnu-gcc-7") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "7.5.0") 5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_C_COMPILER_WRAPPER "") 7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") 9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") 10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") 11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") 12 | 13 | set(CMAKE_C_PLATFORM_ID "Linux") 14 | set(CMAKE_C_SIMULATE_ID "") 15 | set(CMAKE_C_SIMULATE_VERSION "") 16 | 17 | 18 | 19 | set(CMAKE_AR "/usr/bin/ar") 20 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-7") 21 | set(CMAKE_RANLIB "/usr/bin/ranlib") 22 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7") 23 | set(CMAKE_LINKER "/usr/bin/ld") 24 | set(CMAKE_COMPILER_IS_GNUCC 1) 25 | set(CMAKE_C_COMPILER_LOADED 1) 26 | set(CMAKE_C_COMPILER_WORKS TRUE) 27 | set(CMAKE_C_ABI_COMPILED TRUE) 28 | set(CMAKE_COMPILER_IS_MINGW ) 29 | set(CMAKE_COMPILER_IS_CYGWIN ) 30 | if(CMAKE_COMPILER_IS_CYGWIN) 31 | set(CYGWIN 1) 32 | set(UNIX 1) 33 | endif() 34 | 35 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 36 | 37 | if(CMAKE_COMPILER_IS_MINGW) 38 | set(MINGW 1) 39 | endif() 40 | set(CMAKE_C_COMPILER_ID_RUN 1) 41 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 42 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 43 | set(CMAKE_C_LINKER_PREFERENCE 10) 44 | 45 | # Save compiler ABI information. 46 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 47 | set(CMAKE_C_COMPILER_ABI "ELF") 48 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 49 | 50 | if(CMAKE_C_SIZEOF_DATA_PTR) 51 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 52 | endif() 53 | 54 | if(CMAKE_C_COMPILER_ABI) 55 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 56 | endif() 57 | 58 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 59 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 60 | endif() 61 | 62 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 63 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 64 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 65 | endif() 66 | 67 | 68 | 69 | 70 | 71 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") 72 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 73 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 74 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/x86_64-linux-gnu-g++-7") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "7.5.0") 5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_CXX_COMPILER_WRAPPER "") 7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") 8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") 9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") 10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") 13 | 14 | set(CMAKE_CXX_PLATFORM_ID "Linux") 15 | set(CMAKE_CXX_SIMULATE_ID "") 16 | set(CMAKE_CXX_SIMULATE_VERSION "") 17 | 18 | 19 | 20 | set(CMAKE_AR "/usr/bin/ar") 21 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-7") 22 | set(CMAKE_RANLIB "/usr/bin/ranlib") 23 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7") 24 | set(CMAKE_LINKER "/usr/bin/ld") 25 | set(CMAKE_COMPILER_IS_GNUCXX 1) 26 | set(CMAKE_CXX_COMPILER_LOADED 1) 27 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 28 | set(CMAKE_CXX_ABI_COMPILED TRUE) 29 | set(CMAKE_COMPILER_IS_MINGW ) 30 | set(CMAKE_COMPILER_IS_CYGWIN ) 31 | if(CMAKE_COMPILER_IS_CYGWIN) 32 | set(CYGWIN 1) 33 | set(UNIX 1) 34 | endif() 35 | 36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 37 | 38 | if(CMAKE_COMPILER_IS_MINGW) 39 | set(MINGW 1) 40 | endif() 41 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 42 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 43 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 44 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 45 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 46 | 47 | # Save compiler ABI information. 48 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 49 | set(CMAKE_CXX_COMPILER_ABI "ELF") 50 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 51 | 52 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 53 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 54 | endif() 55 | 56 | if(CMAKE_CXX_COMPILER_ABI) 57 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 58 | endif() 59 | 60 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 61 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 62 | endif() 63 | 64 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 65 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 66 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 67 | endif() 68 | 69 | 70 | 71 | 72 | 73 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") 74 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 75 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 76 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-147-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-147-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-147-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-147-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/CMakeFiles/3.10.2/CompilerIdC/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.10.2/CMakeSystem.cmake" 14 | "../src/CMakeLists.txt" 15 | "../src/client/CMakeLists.txt" 16 | "../src/server/CMakeLists.txt" 17 | "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake" 18 | "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake" 19 | "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake" 20 | "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake" 21 | "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake" 22 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake" 23 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake" 24 | "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 25 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake" 26 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake" 27 | "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake" 28 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake" 29 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake" 30 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake" 31 | "/usr/share/cmake-3.10/Modules/Platform/Linux.cmake" 32 | "/usr/share/cmake-3.10/Modules/Platform/UnixPaths.cmake" 33 | ) 34 | 35 | # The corresponding makefile is: 36 | set(CMAKE_MAKEFILE_OUTPUTS 37 | "Makefile" 38 | "CMakeFiles/cmake.check_cache" 39 | ) 40 | 41 | # Byproducts of CMake generate step: 42 | set(CMAKE_MAKEFILE_PRODUCTS 43 | "CMakeFiles/CMakeDirectoryInformation.cmake" 44 | "src/CMakeFiles/CMakeDirectoryInformation.cmake" 45 | "src/server/CMakeFiles/CMakeDirectoryInformation.cmake" 46 | "src/client/CMakeFiles/CMakeDirectoryInformation.cmake" 47 | ) 48 | 49 | # Dependency information for all targets: 50 | set(CMAKE_DEPEND_INFO_FILES 51 | "src/server/CMakeFiles/ChatServer.dir/DependInfo.cmake" 52 | "src/client/CMakeFiles/ChatClient.dir/DependInfo.cmake" 53 | ) 54 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 61 | 62 | #============================================================================= 63 | # Directory level rules for directory src 64 | 65 | # Convenience name for "all" pass in the directory. 66 | src/all: src/server/all 67 | src/all: src/client/all 68 | 69 | .PHONY : src/all 70 | 71 | # Convenience name for "clean" pass in the directory. 72 | src/clean: src/server/clean 73 | src/clean: src/client/clean 74 | 75 | .PHONY : src/clean 76 | 77 | # Convenience name for "preinstall" pass in the directory. 78 | src/preinstall: src/server/preinstall 79 | src/preinstall: src/client/preinstall 80 | 81 | .PHONY : src/preinstall 82 | 83 | #============================================================================= 84 | # Directory level rules for directory src/server 85 | 86 | # Convenience name for "all" pass in the directory. 87 | src/server/all: src/server/CMakeFiles/ChatServer.dir/all 88 | 89 | .PHONY : src/server/all 90 | 91 | # Convenience name for "clean" pass in the directory. 92 | src/server/clean: src/server/CMakeFiles/ChatServer.dir/clean 93 | 94 | .PHONY : src/server/clean 95 | 96 | # Convenience name for "preinstall" pass in the directory. 97 | src/server/preinstall: 98 | 99 | .PHONY : src/server/preinstall 100 | 101 | #============================================================================= 102 | # Target rules for target src/server/CMakeFiles/ChatServer.dir 103 | 104 | # All Build rule for target. 105 | src/server/CMakeFiles/ChatServer.dir/all: 106 | $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/depend 107 | $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/build 108 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles --progress-num=3,4,5,6,7,8,9,10,11,12 "Built target ChatServer" 109 | .PHONY : src/server/CMakeFiles/ChatServer.dir/all 110 | 111 | # Include target in all. 112 | all: src/server/CMakeFiles/ChatServer.dir/all 113 | 114 | .PHONY : all 115 | 116 | # Build rule for subdir invocation for target. 117 | src/server/CMakeFiles/ChatServer.dir/rule: cmake_check_build_system 118 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 10 119 | $(MAKE) -f CMakeFiles/Makefile2 src/server/CMakeFiles/ChatServer.dir/all 120 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 121 | .PHONY : src/server/CMakeFiles/ChatServer.dir/rule 122 | 123 | # Convenience name for target. 124 | ChatServer: src/server/CMakeFiles/ChatServer.dir/rule 125 | 126 | .PHONY : ChatServer 127 | 128 | # clean rule for target. 129 | src/server/CMakeFiles/ChatServer.dir/clean: 130 | $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/clean 131 | .PHONY : src/server/CMakeFiles/ChatServer.dir/clean 132 | 133 | # clean rule for target. 134 | clean: src/server/CMakeFiles/ChatServer.dir/clean 135 | 136 | .PHONY : clean 137 | 138 | #============================================================================= 139 | # Directory level rules for directory src/client 140 | 141 | # Convenience name for "all" pass in the directory. 142 | src/client/all: src/client/CMakeFiles/ChatClient.dir/all 143 | 144 | .PHONY : src/client/all 145 | 146 | # Convenience name for "clean" pass in the directory. 147 | src/client/clean: src/client/CMakeFiles/ChatClient.dir/clean 148 | 149 | .PHONY : src/client/clean 150 | 151 | # Convenience name for "preinstall" pass in the directory. 152 | src/client/preinstall: 153 | 154 | .PHONY : src/client/preinstall 155 | 156 | #============================================================================= 157 | # Target rules for target src/client/CMakeFiles/ChatClient.dir 158 | 159 | # All Build rule for target. 160 | src/client/CMakeFiles/ChatClient.dir/all: 161 | $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/depend 162 | $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/build 163 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles --progress-num=1,2 "Built target ChatClient" 164 | .PHONY : src/client/CMakeFiles/ChatClient.dir/all 165 | 166 | # Include target in all. 167 | all: src/client/CMakeFiles/ChatClient.dir/all 168 | 169 | .PHONY : all 170 | 171 | # Build rule for subdir invocation for target. 172 | src/client/CMakeFiles/ChatClient.dir/rule: cmake_check_build_system 173 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 2 174 | $(MAKE) -f CMakeFiles/Makefile2 src/client/CMakeFiles/ChatClient.dir/all 175 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 176 | .PHONY : src/client/CMakeFiles/ChatClient.dir/rule 177 | 178 | # Convenience name for target. 179 | ChatClient: src/client/CMakeFiles/ChatClient.dir/rule 180 | 181 | .PHONY : ChatClient 182 | 183 | # clean rule for target. 184 | src/client/CMakeFiles/ChatClient.dir/clean: 185 | $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/clean 186 | .PHONY : src/client/CMakeFiles/ChatClient.dir/clean 187 | 188 | # clean rule for target. 189 | clean: src/client/CMakeFiles/ChatClient.dir/clean 190 | 191 | .PHONY : clean 192 | 193 | #============================================================================= 194 | # Special targets to cleanup operation of make. 195 | 196 | # Special rule to run CMake to check the build system integrity. 197 | # No rule that depends on this can have commands that come from listfiles 198 | # because they might be regenerated. 199 | cmake_check_build_system: 200 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 201 | .PHONY : cmake_check_build_system 202 | 203 | -------------------------------------------------------------------------------- /build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles/rebuild_cache.dir 2 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles/edit_cache.dir 3 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/CMakeFiles/rebuild_cache.dir 4 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/CMakeFiles/edit_cache.dir 5 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/rebuild_cache.dir 6 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir 7 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/edit_cache.dir 8 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/rebuild_cache.dir 9 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/ChatClient.dir 10 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/edit_cache.dir 11 | -------------------------------------------------------------------------------- /build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /build/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles/progress.marks 84 | $(MAKE) -f CMakeFiles/Makefile2 all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | $(MAKE) -f CMakeFiles/Makefile2 clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | #============================================================================= 114 | # Target rules for targets named ChatServer 115 | 116 | # Build rule for target. 117 | ChatServer: cmake_check_build_system 118 | $(MAKE) -f CMakeFiles/Makefile2 ChatServer 119 | .PHONY : ChatServer 120 | 121 | # fast build rule for target. 122 | ChatServer/fast: 123 | $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/build 124 | .PHONY : ChatServer/fast 125 | 126 | #============================================================================= 127 | # Target rules for targets named ChatClient 128 | 129 | # Build rule for target. 130 | ChatClient: cmake_check_build_system 131 | $(MAKE) -f CMakeFiles/Makefile2 ChatClient 132 | .PHONY : ChatClient 133 | 134 | # fast build rule for target. 135 | ChatClient/fast: 136 | $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/build 137 | .PHONY : ChatClient/fast 138 | 139 | # Help Target 140 | help: 141 | @echo "The following are some of the valid targets for this Makefile:" 142 | @echo "... all (the default if no target is provided)" 143 | @echo "... clean" 144 | @echo "... depend" 145 | @echo "... rebuild_cache" 146 | @echo "... edit_cache" 147 | @echo "... ChatServer" 148 | @echo "... ChatClient" 149 | .PHONY : help 150 | 151 | 152 | 153 | #============================================================================= 154 | # Special targets to cleanup operation of make. 155 | 156 | # Special rule to run CMake to check the build system integrity. 157 | # No rule that depends on this can have commands that come from listfiles 158 | # because they might be regenerated. 159 | cmake_check_build_system: 160 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 161 | .PHONY : cmake_check_build_system 162 | 163 | -------------------------------------------------------------------------------- /build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(NOT CMAKE_INSTALL_LOCAL_ONLY) 41 | # Include the install script for each subdirectory. 42 | include("/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/cmake_install.cmake") 43 | 44 | endif() 45 | 46 | if(CMAKE_INSTALL_COMPONENT) 47 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 48 | else() 49 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 50 | endif() 51 | 52 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 53 | "${CMAKE_INSTALL_MANIFEST_FILES}") 54 | file(WRITE "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/${CMAKE_INSTALL_MANIFEST}" 55 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 56 | -------------------------------------------------------------------------------- /build/compile_commands.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 4 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/chatserver.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.cpp", 5 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.cpp" 6 | }, 7 | { 8 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 9 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/chatservice.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.cpp", 10 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.cpp" 11 | }, 12 | { 13 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 14 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/main.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/main.cpp", 15 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/main.cpp" 16 | }, 17 | { 18 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 19 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/db/db.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.cpp", 20 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.cpp" 21 | }, 22 | { 23 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 24 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.cpp", 25 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.cpp" 26 | }, 27 | { 28 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 29 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/groupmodel.cpp", 30 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/groupmodel.cpp" 31 | }, 32 | { 33 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 34 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.cpp", 35 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.cpp" 36 | }, 37 | { 38 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 39 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/model/usermodel.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.cpp", 40 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.cpp" 41 | }, 42 | { 43 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server", 44 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatServer.dir/redis/redis.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.cpp", 45 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.cpp" 46 | }, 47 | { 48 | "directory": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client", 49 | "command": "/usr/bin/x86_64-linux-gnu-g++-7 -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty -g -g -o CMakeFiles/ChatClient.dir/main.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp", 50 | "file": "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp" 51 | } 52 | ] -------------------------------------------------------------------------------- /build/src/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /build/src/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/CMakeFiles/progress.marks 84 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Help Target 114 | help: 115 | @echo "The following are some of the valid targets for this Makefile:" 116 | @echo "... all (the default if no target is provided)" 117 | @echo "... clean" 118 | @echo "... depend" 119 | @echo "... rebuild_cache" 120 | @echo "... edit_cache" 121 | .PHONY : help 122 | 123 | 124 | 125 | #============================================================================= 126 | # Special targets to cleanup operation of make. 127 | 128 | # Special rule to run CMake to check the build system integrity. 129 | # No rule that depends on this can have commands that come from listfiles 130 | # because they might be regenerated. 131 | cmake_check_build_system: 132 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 133 | .PHONY : cmake_check_build_system 134 | 135 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | ../include/public.hpp 10 | 11 | ../include/server/model/group.hpp 12 | string 13 | - 14 | vector 15 | - 16 | group_user.hpp 17 | ../include/server/model/group_user.hpp 18 | 19 | ../include/server/model/group_user.hpp 20 | user.hpp 21 | ../include/server/model/user.hpp 22 | string 23 | - 24 | 25 | ../include/server/model/user.hpp 26 | string 27 | - 28 | 29 | ../thidrparty/json.hpp 30 | algorithm 31 | - 32 | cassert 33 | - 34 | ciso646 35 | - 36 | cstddef 37 | - 38 | functional 39 | - 40 | initializer_list 41 | - 42 | iosfwd 43 | - 44 | iterator 45 | - 46 | memory 47 | - 48 | numeric 49 | - 50 | string 51 | - 52 | utility 53 | - 54 | vector 55 | - 56 | utility 57 | - 58 | algorithm 59 | - 60 | array 61 | - 62 | ciso646 63 | - 64 | forward_list 65 | - 66 | iterator 67 | - 68 | map 69 | - 70 | string 71 | - 72 | tuple 73 | - 74 | type_traits 75 | - 76 | unordered_map 77 | - 78 | utility 79 | - 80 | valarray 81 | - 82 | exception 83 | - 84 | stdexcept 85 | - 86 | string 87 | - 88 | cstddef 89 | - 90 | utility 91 | - 92 | cstdlib 93 | - 94 | ciso646 95 | - 96 | cstddef 97 | - 98 | type_traits 99 | - 100 | ciso646 101 | - 102 | limits 103 | - 104 | type_traits 105 | - 106 | utility 107 | - 108 | iterator 109 | - 110 | type_traits 111 | - 112 | cstdint 113 | - 114 | map 115 | - 116 | memory 117 | - 118 | string 119 | - 120 | vector 121 | - 122 | array 123 | - 124 | ciso646 125 | - 126 | cstddef 127 | - 128 | cstdint 129 | - 130 | string 131 | - 132 | algorithm 133 | - 134 | ciso646 135 | - 136 | iterator 137 | - 138 | string 139 | - 140 | tuple 141 | - 142 | type_traits 143 | - 144 | utility 145 | - 146 | valarray 147 | - 148 | vector 149 | - 150 | cstddef 151 | - 152 | iterator 153 | - 154 | string 155 | - 156 | tuple 157 | - 158 | algorithm 159 | - 160 | array 161 | - 162 | cassert 163 | - 164 | cmath 165 | - 166 | cstddef 167 | - 168 | cstdint 169 | - 170 | cstdio 171 | - 172 | cstring 173 | - 174 | iterator 175 | - 176 | limits 177 | - 178 | string 179 | - 180 | utility 181 | - 182 | array 183 | - 184 | cassert 185 | - 186 | cstddef 187 | - 188 | cstdio 189 | - 190 | cstring 191 | - 192 | istream 193 | - 194 | iterator 195 | - 196 | memory 197 | - 198 | numeric 199 | - 200 | string 201 | - 202 | type_traits 203 | - 204 | utility 205 | - 206 | cassert 207 | - 208 | cstddef 209 | - 210 | string 211 | - 212 | utility 213 | - 214 | vector 215 | - 216 | cstdint 217 | - 218 | utility 219 | - 220 | string 221 | - 222 | array 223 | - 224 | clocale 225 | - 226 | cstddef 227 | - 228 | cstdio 229 | - 230 | cstdlib 231 | - 232 | initializer_list 233 | - 234 | string 235 | - 236 | utility 237 | - 238 | vector 239 | - 240 | cassert 241 | - 242 | cmath 243 | - 244 | cstdint 245 | - 246 | functional 247 | - 248 | string 249 | - 250 | utility 251 | - 252 | vector 253 | - 254 | cstddef 255 | - 256 | limits 257 | - 258 | ciso646 259 | - 260 | iterator 261 | - 262 | type_traits 263 | - 264 | cstddef 265 | - 266 | iterator 267 | - 268 | utility 269 | - 270 | algorithm 271 | - 272 | cassert 273 | - 274 | cctype 275 | - 276 | numeric 277 | - 278 | string 279 | - 280 | utility 281 | - 282 | vector 283 | - 284 | initializer_list 285 | - 286 | utility 287 | - 288 | algorithm 289 | - 290 | array 291 | - 292 | cstdint 293 | - 294 | cstring 295 | - 296 | limits 297 | - 298 | string 299 | - 300 | algorithm 301 | - 302 | cstddef 303 | - 304 | ios 305 | - 306 | iterator 307 | - 308 | memory 309 | - 310 | ostream 311 | - 312 | string 313 | - 314 | vector 315 | - 316 | algorithm 317 | - 318 | array 319 | - 320 | cassert 321 | - 322 | ciso646 323 | - 324 | clocale 325 | - 326 | cmath 327 | - 328 | cstddef 329 | - 330 | cstdint 331 | - 332 | cstdio 333 | - 334 | limits 335 | - 336 | string 337 | - 338 | type_traits 339 | - 340 | utility 341 | - 342 | array 343 | - 344 | cassert 345 | - 346 | ciso646 347 | - 348 | cmath 349 | - 350 | cstdint 351 | - 352 | cstring 353 | - 354 | limits 355 | - 356 | type_traits 357 | - 358 | 359 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp 360 | json.hpp 361 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/json.hpp 362 | iostream 363 | - 364 | thread 365 | - 366 | string 367 | - 368 | vector 369 | - 370 | chrono 371 | - 372 | ctime 373 | - 374 | unordered_map 375 | - 376 | functional 377 | - 378 | unistd.h 379 | - 380 | sys/socket.h 381 | - 382 | sys/types.h 383 | - 384 | netinet/in.h 385 | - 386 | arpa/inet.h 387 | - 388 | semaphore.h 389 | - 390 | atomic 391 | - 392 | group.hpp 393 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/group.hpp 394 | user.hpp 395 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/user.hpp 396 | public.hpp 397 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/public.hpp 398 | 399 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/ChatClient.dir/main.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "GNU") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "../include" 14 | "../include/server" 15 | "../include/server/db" 16 | "../include/server/model" 17 | "../include/server/redis" 18 | "../thidrparty" 19 | ) 20 | 21 | # Targets to which this target links. 22 | set(CMAKE_TARGET_LINKED_INFO_FILES 23 | ) 24 | 25 | # Fortran module output directory. 26 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 27 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 50 | 51 | # Include any dependencies generated for this target. 52 | include src/client/CMakeFiles/ChatClient.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include src/client/CMakeFiles/ChatClient.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include src/client/CMakeFiles/ChatClient.dir/flags.make 59 | 60 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: src/client/CMakeFiles/ChatClient.dir/flags.make 61 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../src/client/main.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object src/client/CMakeFiles/ChatClient.dir/main.cpp.o" 63 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client && /usr/bin/x86_64-linux-gnu-g++-7 $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/ChatClient.dir/main.cpp.o -c /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp 64 | 65 | src/client/CMakeFiles/ChatClient.dir/main.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ChatClient.dir/main.cpp.i" 67 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client && /usr/bin/x86_64-linux-gnu-g++-7 $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp > CMakeFiles/ChatClient.dir/main.cpp.i 68 | 69 | src/client/CMakeFiles/ChatClient.dir/main.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ChatClient.dir/main.cpp.s" 71 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client && /usr/bin/x86_64-linux-gnu-g++-7 $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp -o CMakeFiles/ChatClient.dir/main.cpp.s 72 | 73 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o.requires: 74 | 75 | .PHONY : src/client/CMakeFiles/ChatClient.dir/main.cpp.o.requires 76 | 77 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o.provides: src/client/CMakeFiles/ChatClient.dir/main.cpp.o.requires 78 | $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/main.cpp.o.provides.build 79 | .PHONY : src/client/CMakeFiles/ChatClient.dir/main.cpp.o.provides 80 | 81 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o.provides.build: src/client/CMakeFiles/ChatClient.dir/main.cpp.o 82 | 83 | 84 | # Object files for target ChatClient 85 | ChatClient_OBJECTS = \ 86 | "CMakeFiles/ChatClient.dir/main.cpp.o" 87 | 88 | # External object files for target ChatClient 89 | ChatClient_EXTERNAL_OBJECTS = 90 | 91 | ../bin/ChatClient: src/client/CMakeFiles/ChatClient.dir/main.cpp.o 92 | ../bin/ChatClient: src/client/CMakeFiles/ChatClient.dir/build.make 93 | ../bin/ChatClient: src/client/CMakeFiles/ChatClient.dir/link.txt 94 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable ../../../bin/ChatClient" 95 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/ChatClient.dir/link.txt --verbose=$(VERBOSE) 96 | 97 | # Rule to build all files generated by this target. 98 | src/client/CMakeFiles/ChatClient.dir/build: ../bin/ChatClient 99 | 100 | .PHONY : src/client/CMakeFiles/ChatClient.dir/build 101 | 102 | src/client/CMakeFiles/ChatClient.dir/requires: src/client/CMakeFiles/ChatClient.dir/main.cpp.o.requires 103 | 104 | .PHONY : src/client/CMakeFiles/ChatClient.dir/requires 105 | 106 | src/client/CMakeFiles/ChatClient.dir/clean: 107 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client && $(CMAKE_COMMAND) -P CMakeFiles/ChatClient.dir/cmake_clean.cmake 108 | .PHONY : src/client/CMakeFiles/ChatClient.dir/clean 109 | 110 | src/client/CMakeFiles/ChatClient.dir/depend: 111 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/ChatClient.dir/DependInfo.cmake --color=$(COLOR) 112 | .PHONY : src/client/CMakeFiles/ChatClient.dir/depend 113 | 114 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/ChatClient.dir/main.cpp.o" 3 | "../../../bin/ChatClient.pdb" 4 | "../../../bin/ChatClient" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/ChatClient.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o 5 | ../include/public.hpp 6 | ../include/server/model/group.hpp 7 | ../include/server/model/group_user.hpp 8 | ../include/server/model/user.hpp 9 | ../thidrparty/json.hpp 10 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client/main.cpp 11 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../include/public.hpp 5 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../include/server/model/group.hpp 6 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../include/server/model/group_user.hpp 7 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../include/server/model/user.hpp 8 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../thidrparty/json.hpp 9 | src/client/CMakeFiles/ChatClient.dir/main.cpp.o: ../src/client/main.cpp 10 | 11 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/x86_64-linux-gnu-g++-7 5 | CXX_FLAGS = -g -g 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty 10 | 11 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/x86_64-linux-gnu-g++-7 -g -g -rdynamic CMakeFiles/ChatClient.dir/main.cpp.o -o ../../../bin/ChatClient -lpthread 2 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/main.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/client/CMakeFiles/ChatClient.dir/main.cpp.o -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/ChatClient.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /build/src/client/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /build/src/client/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/CMakeFiles/progress.marks 84 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/client/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/client/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/client/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/client/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Convenience name for target. 114 | src/client/CMakeFiles/ChatClient.dir/rule: 115 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/client/CMakeFiles/ChatClient.dir/rule 116 | .PHONY : src/client/CMakeFiles/ChatClient.dir/rule 117 | 118 | # Convenience name for target. 119 | ChatClient: src/client/CMakeFiles/ChatClient.dir/rule 120 | 121 | .PHONY : ChatClient 122 | 123 | # fast build rule for target. 124 | ChatClient/fast: 125 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/build 126 | .PHONY : ChatClient/fast 127 | 128 | main.o: main.cpp.o 129 | 130 | .PHONY : main.o 131 | 132 | # target to build an object file 133 | main.cpp.o: 134 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/main.cpp.o 135 | .PHONY : main.cpp.o 136 | 137 | main.i: main.cpp.i 138 | 139 | .PHONY : main.i 140 | 141 | # target to preprocess a source file 142 | main.cpp.i: 143 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/main.cpp.i 144 | .PHONY : main.cpp.i 145 | 146 | main.s: main.cpp.s 147 | 148 | .PHONY : main.s 149 | 150 | # target to generate assembly for a file 151 | main.cpp.s: 152 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/client/CMakeFiles/ChatClient.dir/build.make src/client/CMakeFiles/ChatClient.dir/main.cpp.s 153 | .PHONY : main.cpp.s 154 | 155 | # Help Target 156 | help: 157 | @echo "The following are some of the valid targets for this Makefile:" 158 | @echo "... all (the default if no target is provided)" 159 | @echo "... clean" 160 | @echo "... depend" 161 | @echo "... rebuild_cache" 162 | @echo "... ChatClient" 163 | @echo "... edit_cache" 164 | @echo "... main.o" 165 | @echo "... main.i" 166 | @echo "... main.s" 167 | .PHONY : help 168 | 169 | 170 | 171 | #============================================================================= 172 | # Special targets to cleanup operation of make. 173 | 174 | # Special rule to run CMake to check the build system integrity. 175 | # No rule that depends on this can have commands that come from listfiles 176 | # because they might be regenerated. 177 | cmake_check_build_system: 178 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 179 | .PHONY : cmake_check_build_system 180 | 181 | -------------------------------------------------------------------------------- /build/src/client/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/client 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /build/src/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(NOT CMAKE_INSTALL_LOCAL_ONLY) 41 | # Include the install script for each subdirectory. 42 | include("/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/cmake_install.cmake") 43 | include("/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/client/cmake_install.cmake") 44 | 45 | endif() 46 | 47 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | ../include/public.hpp 10 | 11 | ../include/server/chatserver.hpp 12 | muduo/net/TcpServer.h 13 | - 14 | muduo/net/EventLoop.h 15 | - 16 | 17 | ../include/server/chatservice.hpp 18 | muduo/net/TcpConnection.h 19 | - 20 | unordered_map 21 | - 22 | functional 23 | - 24 | mutex 25 | - 26 | json.hpp 27 | ../include/server/json.hpp 28 | usermodel.hpp 29 | ../include/server/usermodel.hpp 30 | offlinemessagemodel.hpp 31 | ../include/server/offlinemessagemodel.hpp 32 | friendmodel.hpp 33 | ../include/server/friendmodel.hpp 34 | group_model.hpp 35 | ../include/server/group_model.hpp 36 | redis.hpp 37 | ../include/server/redis.hpp 38 | 39 | ../include/server/db/db.h 40 | mysql/mysql.h 41 | - 42 | string 43 | - 44 | 45 | ../include/server/model/friendmodel.hpp 46 | user.hpp 47 | ../include/server/model/user.hpp 48 | vector 49 | - 50 | 51 | ../include/server/model/group.hpp 52 | string 53 | - 54 | vector 55 | - 56 | group_user.hpp 57 | ../include/server/model/group_user.hpp 58 | 59 | ../include/server/model/group_model.hpp 60 | group.hpp 61 | ../include/server/model/group.hpp 62 | string 63 | - 64 | vector 65 | - 66 | 67 | ../include/server/model/group_user.hpp 68 | user.hpp 69 | ../include/server/model/user.hpp 70 | string 71 | - 72 | 73 | ../include/server/model/offlinemessagemodel.hpp 74 | string 75 | - 76 | vector 77 | - 78 | 79 | ../include/server/model/user.hpp 80 | string 81 | - 82 | 83 | ../include/server/model/usermodel.hpp 84 | user.hpp 85 | ../include/server/model/user.hpp 86 | 87 | ../include/server/redis/redis.hpp 88 | hiredis/hiredis.h 89 | - 90 | thread 91 | - 92 | functional 93 | - 94 | 95 | ../thidrparty/json.hpp 96 | algorithm 97 | - 98 | cassert 99 | - 100 | ciso646 101 | - 102 | cstddef 103 | - 104 | functional 105 | - 106 | initializer_list 107 | - 108 | iosfwd 109 | - 110 | iterator 111 | - 112 | memory 113 | - 114 | numeric 115 | - 116 | string 117 | - 118 | utility 119 | - 120 | vector 121 | - 122 | utility 123 | - 124 | algorithm 125 | - 126 | array 127 | - 128 | ciso646 129 | - 130 | forward_list 131 | - 132 | iterator 133 | - 134 | map 135 | - 136 | string 137 | - 138 | tuple 139 | - 140 | type_traits 141 | - 142 | unordered_map 143 | - 144 | utility 145 | - 146 | valarray 147 | - 148 | exception 149 | - 150 | stdexcept 151 | - 152 | string 153 | - 154 | cstddef 155 | - 156 | utility 157 | - 158 | cstdlib 159 | - 160 | ciso646 161 | - 162 | cstddef 163 | - 164 | type_traits 165 | - 166 | ciso646 167 | - 168 | limits 169 | - 170 | type_traits 171 | - 172 | utility 173 | - 174 | iterator 175 | - 176 | type_traits 177 | - 178 | cstdint 179 | - 180 | map 181 | - 182 | memory 183 | - 184 | string 185 | - 186 | vector 187 | - 188 | array 189 | - 190 | ciso646 191 | - 192 | cstddef 193 | - 194 | cstdint 195 | - 196 | string 197 | - 198 | algorithm 199 | - 200 | ciso646 201 | - 202 | iterator 203 | - 204 | string 205 | - 206 | tuple 207 | - 208 | type_traits 209 | - 210 | utility 211 | - 212 | valarray 213 | - 214 | vector 215 | - 216 | cstddef 217 | - 218 | iterator 219 | - 220 | string 221 | - 222 | tuple 223 | - 224 | algorithm 225 | - 226 | array 227 | - 228 | cassert 229 | - 230 | cmath 231 | - 232 | cstddef 233 | - 234 | cstdint 235 | - 236 | cstdio 237 | - 238 | cstring 239 | - 240 | iterator 241 | - 242 | limits 243 | - 244 | string 245 | - 246 | utility 247 | - 248 | array 249 | - 250 | cassert 251 | - 252 | cstddef 253 | - 254 | cstdio 255 | - 256 | cstring 257 | - 258 | istream 259 | - 260 | iterator 261 | - 262 | memory 263 | - 264 | numeric 265 | - 266 | string 267 | - 268 | type_traits 269 | - 270 | utility 271 | - 272 | cassert 273 | - 274 | cstddef 275 | - 276 | string 277 | - 278 | utility 279 | - 280 | vector 281 | - 282 | cstdint 283 | - 284 | utility 285 | - 286 | string 287 | - 288 | array 289 | - 290 | clocale 291 | - 292 | cstddef 293 | - 294 | cstdio 295 | - 296 | cstdlib 297 | - 298 | initializer_list 299 | - 300 | string 301 | - 302 | utility 303 | - 304 | vector 305 | - 306 | cassert 307 | - 308 | cmath 309 | - 310 | cstdint 311 | - 312 | functional 313 | - 314 | string 315 | - 316 | utility 317 | - 318 | vector 319 | - 320 | cstddef 321 | - 322 | limits 323 | - 324 | ciso646 325 | - 326 | iterator 327 | - 328 | type_traits 329 | - 330 | cstddef 331 | - 332 | iterator 333 | - 334 | utility 335 | - 336 | algorithm 337 | - 338 | cassert 339 | - 340 | cctype 341 | - 342 | numeric 343 | - 344 | string 345 | - 346 | utility 347 | - 348 | vector 349 | - 350 | initializer_list 351 | - 352 | utility 353 | - 354 | algorithm 355 | - 356 | array 357 | - 358 | cstdint 359 | - 360 | cstring 361 | - 362 | limits 363 | - 364 | string 365 | - 366 | algorithm 367 | - 368 | cstddef 369 | - 370 | ios 371 | - 372 | iterator 373 | - 374 | memory 375 | - 376 | ostream 377 | - 378 | string 379 | - 380 | vector 381 | - 382 | algorithm 383 | - 384 | array 385 | - 386 | cassert 387 | - 388 | ciso646 389 | - 390 | clocale 391 | - 392 | cmath 393 | - 394 | cstddef 395 | - 396 | cstdint 397 | - 398 | cstdio 399 | - 400 | limits 401 | - 402 | string 403 | - 404 | type_traits 405 | - 406 | utility 407 | - 408 | array 409 | - 410 | cassert 411 | - 412 | ciso646 413 | - 414 | cmath 415 | - 416 | cstdint 417 | - 418 | cstring 419 | - 420 | limits 421 | - 422 | type_traits 423 | - 424 | 425 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.cpp 426 | chatserver.hpp 427 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.hpp 428 | json.hpp 429 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/json.hpp 430 | chatservice.hpp 431 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.hpp 432 | iostream 433 | - 434 | functional 435 | - 436 | string 437 | - 438 | 439 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.cpp 440 | chatservice.hpp 441 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.hpp 442 | public.hpp 443 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/public.hpp 444 | muduo/base/Logging.h 445 | - 446 | string 447 | - 448 | vector 449 | - 450 | 451 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.cpp 452 | db.h 453 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.h 454 | muduo/base/Logging.h 455 | - 456 | 457 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/main.cpp 458 | chatserver.hpp 459 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.hpp 460 | chatservice.hpp 461 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.hpp 462 | muduo/base/Logging.h 463 | - 464 | iostream 465 | - 466 | signal.h 467 | - 468 | 469 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.cpp 470 | friendmodel.hpp 471 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.hpp 472 | db.h 473 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/db.h 474 | 475 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/groupmodel.cpp 476 | group_model.hpp 477 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/group_model.hpp 478 | db.h 479 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/db.h 480 | 481 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.cpp 482 | offlinemessagemodel.hpp 483 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.hpp 484 | db.h 485 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/db.h 486 | 487 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.cpp 488 | usermodel.hpp 489 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.hpp 490 | db.h 491 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/db.h 492 | iostream 493 | - 494 | 495 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.cpp 496 | redis.hpp 497 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.hpp 498 | iostream 499 | - 500 | 501 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o" 8 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o" 9 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o" 10 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/main.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/main.cpp.o" 11 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o" 12 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/groupmodel.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o" 13 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o" 14 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o" 15 | "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.cpp" "/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o" 16 | ) 17 | set(CMAKE_CXX_COMPILER_ID "GNU") 18 | 19 | # The include file search paths: 20 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 21 | "../include" 22 | "../include/server" 23 | "../include/server/db" 24 | "../include/server/model" 25 | "../include/server/redis" 26 | "../thidrparty" 27 | ) 28 | 29 | # Targets to which this target links. 30 | set(CMAKE_TARGET_LINKED_INFO_FILES 31 | ) 32 | 33 | # Fortran module output directory. 34 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 35 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/ChatServer.dir/chatserver.cpp.o" 3 | "CMakeFiles/ChatServer.dir/chatservice.cpp.o" 4 | "CMakeFiles/ChatServer.dir/main.cpp.o" 5 | "CMakeFiles/ChatServer.dir/db/db.cpp.o" 6 | "CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o" 7 | "CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o" 8 | "CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o" 9 | "CMakeFiles/ChatServer.dir/model/usermodel.cpp.o" 10 | "CMakeFiles/ChatServer.dir/redis/redis.cpp.o" 11 | "../../../bin/ChatServer.pdb" 12 | "../../../bin/ChatServer" 13 | ) 14 | 15 | # Per-language clean rules from dependency scanning. 16 | foreach(lang CXX) 17 | include(CMakeFiles/ChatServer.dir/cmake_clean_${lang}.cmake OPTIONAL) 18 | endforeach() 19 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o 5 | ../include/server/chatserver.hpp 6 | ../include/server/chatservice.hpp 7 | ../include/server/model/friendmodel.hpp 8 | ../include/server/model/group.hpp 9 | ../include/server/model/group_model.hpp 10 | ../include/server/model/group_user.hpp 11 | ../include/server/model/offlinemessagemodel.hpp 12 | ../include/server/model/user.hpp 13 | ../include/server/model/usermodel.hpp 14 | ../include/server/redis/redis.hpp 15 | ../thidrparty/json.hpp 16 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatserver.cpp 17 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o 18 | ../include/public.hpp 19 | ../include/server/chatservice.hpp 20 | ../include/server/model/friendmodel.hpp 21 | ../include/server/model/group.hpp 22 | ../include/server/model/group_model.hpp 23 | ../include/server/model/group_user.hpp 24 | ../include/server/model/offlinemessagemodel.hpp 25 | ../include/server/model/user.hpp 26 | ../include/server/model/usermodel.hpp 27 | ../include/server/redis/redis.hpp 28 | ../thidrparty/json.hpp 29 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/chatservice.cpp 30 | src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o 31 | ../include/server/db/db.h 32 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/db/db.cpp 33 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o 34 | ../include/server/chatserver.hpp 35 | ../include/server/chatservice.hpp 36 | ../include/server/model/friendmodel.hpp 37 | ../include/server/model/group.hpp 38 | ../include/server/model/group_model.hpp 39 | ../include/server/model/group_user.hpp 40 | ../include/server/model/offlinemessagemodel.hpp 41 | ../include/server/model/user.hpp 42 | ../include/server/model/usermodel.hpp 43 | ../include/server/redis/redis.hpp 44 | ../thidrparty/json.hpp 45 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/main.cpp 46 | src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o 47 | ../include/server/db/db.h 48 | ../include/server/model/friendmodel.hpp 49 | ../include/server/model/user.hpp 50 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/friendmodel.cpp 51 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o 52 | ../include/server/db/db.h 53 | ../include/server/model/group.hpp 54 | ../include/server/model/group_model.hpp 55 | ../include/server/model/group_user.hpp 56 | ../include/server/model/user.hpp 57 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/groupmodel.cpp 58 | src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o 59 | ../include/server/db/db.h 60 | ../include/server/model/offlinemessagemodel.hpp 61 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/offlinemessagemodel.cpp 62 | src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o 63 | ../include/server/db/db.h 64 | ../include/server/model/user.hpp 65 | ../include/server/model/usermodel.hpp 66 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/model/usermodel.cpp 67 | src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o 68 | ../include/server/redis/redis.hpp 69 | /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server/redis/redis.cpp 70 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/chatserver.hpp 5 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/chatservice.hpp 6 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/friendmodel.hpp 7 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/group.hpp 8 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/group_model.hpp 9 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/group_user.hpp 10 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/offlinemessagemodel.hpp 11 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/user.hpp 12 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/model/usermodel.hpp 13 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../include/server/redis/redis.hpp 14 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../thidrparty/json.hpp 15 | src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o: ../src/server/chatserver.cpp 16 | 17 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/public.hpp 18 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/chatservice.hpp 19 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/friendmodel.hpp 20 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/group.hpp 21 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/group_model.hpp 22 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/group_user.hpp 23 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/offlinemessagemodel.hpp 24 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/user.hpp 25 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/model/usermodel.hpp 26 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../include/server/redis/redis.hpp 27 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../thidrparty/json.hpp 28 | src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o: ../src/server/chatservice.cpp 29 | 30 | src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o: ../include/server/db/db.h 31 | src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o: ../src/server/db/db.cpp 32 | 33 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/chatserver.hpp 34 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/chatservice.hpp 35 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/friendmodel.hpp 36 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/group.hpp 37 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/group_model.hpp 38 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/group_user.hpp 39 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/offlinemessagemodel.hpp 40 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/user.hpp 41 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/model/usermodel.hpp 42 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../include/server/redis/redis.hpp 43 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../thidrparty/json.hpp 44 | src/server/CMakeFiles/ChatServer.dir/main.cpp.o: ../src/server/main.cpp 45 | 46 | src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o: ../include/server/db/db.h 47 | src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o: ../include/server/model/friendmodel.hpp 48 | src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o: ../include/server/model/user.hpp 49 | src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o: ../src/server/model/friendmodel.cpp 50 | 51 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../include/server/db/db.h 52 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../include/server/model/group.hpp 53 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../include/server/model/group_model.hpp 54 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../include/server/model/group_user.hpp 55 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../include/server/model/user.hpp 56 | src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: ../src/server/model/groupmodel.cpp 57 | 58 | src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o: ../include/server/db/db.h 59 | src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o: ../include/server/model/offlinemessagemodel.hpp 60 | src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o: ../src/server/model/offlinemessagemodel.cpp 61 | 62 | src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o: ../include/server/db/db.h 63 | src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o: ../include/server/model/user.hpp 64 | src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o: ../include/server/model/usermodel.hpp 65 | src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o: ../src/server/model/usermodel.cpp 66 | 67 | src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o: ../include/server/redis/redis.hpp 68 | src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o: ../src/server/redis/redis.cpp 69 | 70 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/x86_64-linux-gnu-g++-7 5 | CXX_FLAGS = -g -g 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/db -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/model -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/include/server/redis -I/home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/thidrparty 10 | 11 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/x86_64-linux-gnu-g++-7 -g -g -rdynamic CMakeFiles/ChatServer.dir/chatserver.cpp.o CMakeFiles/ChatServer.dir/chatservice.cpp.o CMakeFiles/ChatServer.dir/main.cpp.o CMakeFiles/ChatServer.dir/db/db.cpp.o CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o CMakeFiles/ChatServer.dir/model/usermodel.cpp.o CMakeFiles/ChatServer.dir/redis/redis.cpp.o -o ../../../bin/ChatServer -lmuduo_net -lmuduo_base -lmysqlclient -lhiredis -lpthread 2 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/main.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/main.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 3 2 | CMAKE_PROGRESS_2 = 4 3 | CMAKE_PROGRESS_3 = 5 4 | CMAKE_PROGRESS_4 = 6 5 | CMAKE_PROGRESS_5 = 7 6 | CMAKE_PROGRESS_6 = 8 7 | CMAKE_PROGRESS_7 = 9 8 | CMAKE_PROGRESS_8 = 10 9 | CMAKE_PROGRESS_9 = 11 10 | CMAKE_PROGRESS_10 = 12 11 | 12 | -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shangyizhou/Cluster-Chat-Server/42b80bd66de2e746b9d68b0dc099f60f3760e7d4/build/src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o -------------------------------------------------------------------------------- /build/src/server/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /build/src/server/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/src/server/CMakeFiles/progress.marks 84 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/server/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/server/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/server/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/server/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Convenience name for target. 114 | src/server/CMakeFiles/ChatServer.dir/rule: 115 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f CMakeFiles/Makefile2 src/server/CMakeFiles/ChatServer.dir/rule 116 | .PHONY : src/server/CMakeFiles/ChatServer.dir/rule 117 | 118 | # Convenience name for target. 119 | ChatServer: src/server/CMakeFiles/ChatServer.dir/rule 120 | 121 | .PHONY : ChatServer 122 | 123 | # fast build rule for target. 124 | ChatServer/fast: 125 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/build 126 | .PHONY : ChatServer/fast 127 | 128 | chatserver.o: chatserver.cpp.o 129 | 130 | .PHONY : chatserver.o 131 | 132 | # target to build an object file 133 | chatserver.cpp.o: 134 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.o 135 | .PHONY : chatserver.cpp.o 136 | 137 | chatserver.i: chatserver.cpp.i 138 | 139 | .PHONY : chatserver.i 140 | 141 | # target to preprocess a source file 142 | chatserver.cpp.i: 143 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.i 144 | .PHONY : chatserver.cpp.i 145 | 146 | chatserver.s: chatserver.cpp.s 147 | 148 | .PHONY : chatserver.s 149 | 150 | # target to generate assembly for a file 151 | chatserver.cpp.s: 152 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatserver.cpp.s 153 | .PHONY : chatserver.cpp.s 154 | 155 | chatservice.o: chatservice.cpp.o 156 | 157 | .PHONY : chatservice.o 158 | 159 | # target to build an object file 160 | chatservice.cpp.o: 161 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.o 162 | .PHONY : chatservice.cpp.o 163 | 164 | chatservice.i: chatservice.cpp.i 165 | 166 | .PHONY : chatservice.i 167 | 168 | # target to preprocess a source file 169 | chatservice.cpp.i: 170 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.i 171 | .PHONY : chatservice.cpp.i 172 | 173 | chatservice.s: chatservice.cpp.s 174 | 175 | .PHONY : chatservice.s 176 | 177 | # target to generate assembly for a file 178 | chatservice.cpp.s: 179 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/chatservice.cpp.s 180 | .PHONY : chatservice.cpp.s 181 | 182 | db/db.o: db/db.cpp.o 183 | 184 | .PHONY : db/db.o 185 | 186 | # target to build an object file 187 | db/db.cpp.o: 188 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/db/db.cpp.o 189 | .PHONY : db/db.cpp.o 190 | 191 | db/db.i: db/db.cpp.i 192 | 193 | .PHONY : db/db.i 194 | 195 | # target to preprocess a source file 196 | db/db.cpp.i: 197 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/db/db.cpp.i 198 | .PHONY : db/db.cpp.i 199 | 200 | db/db.s: db/db.cpp.s 201 | 202 | .PHONY : db/db.s 203 | 204 | # target to generate assembly for a file 205 | db/db.cpp.s: 206 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/db/db.cpp.s 207 | .PHONY : db/db.cpp.s 208 | 209 | main.o: main.cpp.o 210 | 211 | .PHONY : main.o 212 | 213 | # target to build an object file 214 | main.cpp.o: 215 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/main.cpp.o 216 | .PHONY : main.cpp.o 217 | 218 | main.i: main.cpp.i 219 | 220 | .PHONY : main.i 221 | 222 | # target to preprocess a source file 223 | main.cpp.i: 224 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/main.cpp.i 225 | .PHONY : main.cpp.i 226 | 227 | main.s: main.cpp.s 228 | 229 | .PHONY : main.s 230 | 231 | # target to generate assembly for a file 232 | main.cpp.s: 233 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/main.cpp.s 234 | .PHONY : main.cpp.s 235 | 236 | model/friendmodel.o: model/friendmodel.cpp.o 237 | 238 | .PHONY : model/friendmodel.o 239 | 240 | # target to build an object file 241 | model/friendmodel.cpp.o: 242 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.o 243 | .PHONY : model/friendmodel.cpp.o 244 | 245 | model/friendmodel.i: model/friendmodel.cpp.i 246 | 247 | .PHONY : model/friendmodel.i 248 | 249 | # target to preprocess a source file 250 | model/friendmodel.cpp.i: 251 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.i 252 | .PHONY : model/friendmodel.cpp.i 253 | 254 | model/friendmodel.s: model/friendmodel.cpp.s 255 | 256 | .PHONY : model/friendmodel.s 257 | 258 | # target to generate assembly for a file 259 | model/friendmodel.cpp.s: 260 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/friendmodel.cpp.s 261 | .PHONY : model/friendmodel.cpp.s 262 | 263 | model/groupmodel.o: model/groupmodel.cpp.o 264 | 265 | .PHONY : model/groupmodel.o 266 | 267 | # target to build an object file 268 | model/groupmodel.cpp.o: 269 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.o 270 | .PHONY : model/groupmodel.cpp.o 271 | 272 | model/groupmodel.i: model/groupmodel.cpp.i 273 | 274 | .PHONY : model/groupmodel.i 275 | 276 | # target to preprocess a source file 277 | model/groupmodel.cpp.i: 278 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.i 279 | .PHONY : model/groupmodel.cpp.i 280 | 281 | model/groupmodel.s: model/groupmodel.cpp.s 282 | 283 | .PHONY : model/groupmodel.s 284 | 285 | # target to generate assembly for a file 286 | model/groupmodel.cpp.s: 287 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/groupmodel.cpp.s 288 | .PHONY : model/groupmodel.cpp.s 289 | 290 | model/offlinemessagemodel.o: model/offlinemessagemodel.cpp.o 291 | 292 | .PHONY : model/offlinemessagemodel.o 293 | 294 | # target to build an object file 295 | model/offlinemessagemodel.cpp.o: 296 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.o 297 | .PHONY : model/offlinemessagemodel.cpp.o 298 | 299 | model/offlinemessagemodel.i: model/offlinemessagemodel.cpp.i 300 | 301 | .PHONY : model/offlinemessagemodel.i 302 | 303 | # target to preprocess a source file 304 | model/offlinemessagemodel.cpp.i: 305 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.i 306 | .PHONY : model/offlinemessagemodel.cpp.i 307 | 308 | model/offlinemessagemodel.s: model/offlinemessagemodel.cpp.s 309 | 310 | .PHONY : model/offlinemessagemodel.s 311 | 312 | # target to generate assembly for a file 313 | model/offlinemessagemodel.cpp.s: 314 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/offlinemessagemodel.cpp.s 315 | .PHONY : model/offlinemessagemodel.cpp.s 316 | 317 | model/usermodel.o: model/usermodel.cpp.o 318 | 319 | .PHONY : model/usermodel.o 320 | 321 | # target to build an object file 322 | model/usermodel.cpp.o: 323 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.o 324 | .PHONY : model/usermodel.cpp.o 325 | 326 | model/usermodel.i: model/usermodel.cpp.i 327 | 328 | .PHONY : model/usermodel.i 329 | 330 | # target to preprocess a source file 331 | model/usermodel.cpp.i: 332 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.i 333 | .PHONY : model/usermodel.cpp.i 334 | 335 | model/usermodel.s: model/usermodel.cpp.s 336 | 337 | .PHONY : model/usermodel.s 338 | 339 | # target to generate assembly for a file 340 | model/usermodel.cpp.s: 341 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/model/usermodel.cpp.s 342 | .PHONY : model/usermodel.cpp.s 343 | 344 | redis/redis.o: redis/redis.cpp.o 345 | 346 | .PHONY : redis/redis.o 347 | 348 | # target to build an object file 349 | redis/redis.cpp.o: 350 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.o 351 | .PHONY : redis/redis.cpp.o 352 | 353 | redis/redis.i: redis/redis.cpp.i 354 | 355 | .PHONY : redis/redis.i 356 | 357 | # target to preprocess a source file 358 | redis/redis.cpp.i: 359 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.i 360 | .PHONY : redis/redis.cpp.i 361 | 362 | redis/redis.s: redis/redis.cpp.s 363 | 364 | .PHONY : redis/redis.s 365 | 366 | # target to generate assembly for a file 367 | redis/redis.cpp.s: 368 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(MAKE) -f src/server/CMakeFiles/ChatServer.dir/build.make src/server/CMakeFiles/ChatServer.dir/redis/redis.cpp.s 369 | .PHONY : redis/redis.cpp.s 370 | 371 | # Help Target 372 | help: 373 | @echo "The following are some of the valid targets for this Makefile:" 374 | @echo "... all (the default if no target is provided)" 375 | @echo "... clean" 376 | @echo "... depend" 377 | @echo "... rebuild_cache" 378 | @echo "... ChatServer" 379 | @echo "... edit_cache" 380 | @echo "... chatserver.o" 381 | @echo "... chatserver.i" 382 | @echo "... chatserver.s" 383 | @echo "... chatservice.o" 384 | @echo "... chatservice.i" 385 | @echo "... chatservice.s" 386 | @echo "... db/db.o" 387 | @echo "... db/db.i" 388 | @echo "... db/db.s" 389 | @echo "... main.o" 390 | @echo "... main.i" 391 | @echo "... main.s" 392 | @echo "... model/friendmodel.o" 393 | @echo "... model/friendmodel.i" 394 | @echo "... model/friendmodel.s" 395 | @echo "... model/groupmodel.o" 396 | @echo "... model/groupmodel.i" 397 | @echo "... model/groupmodel.s" 398 | @echo "... model/offlinemessagemodel.o" 399 | @echo "... model/offlinemessagemodel.i" 400 | @echo "... model/offlinemessagemodel.s" 401 | @echo "... model/usermodel.o" 402 | @echo "... model/usermodel.i" 403 | @echo "... model/usermodel.s" 404 | @echo "... redis/redis.o" 405 | @echo "... redis/redis.i" 406 | @echo "... redis/redis.s" 407 | .PHONY : help 408 | 409 | 410 | 411 | #============================================================================= 412 | # Special targets to cleanup operation of make. 413 | 414 | # Special rule to run CMake to check the build system integrity. 415 | # No rule that depends on this can have commands that come from listfiles 416 | # because they might be regenerated. 417 | cmake_check_build_system: 418 | cd /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 419 | .PHONY : cmake_check_build_system 420 | 421 | -------------------------------------------------------------------------------- /build/src/server/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/shang/code/C++/github-project/student-work-project/Cluster-Server-Chat/src/server 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /chat.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: chat 4 | -- ------------------------------------------------------ 5 | -- Server version 5.7.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `allgroup` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `allgroup`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `allgroup` ( 26 | `id` int(11) NOT NULL AUTO_INCREMENT, 27 | `groupname` varchar(50) CHARACTER SET latin1 NOT NULL, 28 | `groupdesc` varchar(200) CHARACTER SET latin1 DEFAULT '', 29 | PRIMARY KEY (`id`), 30 | UNIQUE KEY `groupname` (`groupname`) 31 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 32 | /*!40101 SET character_set_client = @saved_cs_client */; 33 | 34 | -- 35 | -- Dumping data for table `allgroup` 36 | -- 37 | 38 | LOCK TABLES `allgroup` WRITE; 39 | /*!40000 ALTER TABLE `allgroup` DISABLE KEYS */; 40 | INSERT INTO `allgroup` VALUES (1,'C++ chat project','start develop a chat project'); 41 | /*!40000 ALTER TABLE `allgroup` ENABLE KEYS */; 42 | UNLOCK TABLES; 43 | 44 | -- 45 | -- Table structure for table `friend` 46 | -- 47 | 48 | DROP TABLE IF EXISTS `friend`; 49 | /*!40101 SET @saved_cs_client = @@character_set_client */; 50 | /*!40101 SET character_set_client = utf8 */; 51 | CREATE TABLE `friend` ( 52 | `userid` int(11) NOT NULL, 53 | `friendid` int(11) NOT NULL, 54 | KEY `userid` (`userid`,`friendid`) 55 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 56 | /*!40101 SET character_set_client = @saved_cs_client */; 57 | 58 | -- 59 | -- Dumping data for table `friend` 60 | -- 61 | 62 | LOCK TABLES `friend` WRITE; 63 | /*!40000 ALTER TABLE `friend` DISABLE KEYS */; 64 | INSERT INTO `friend` VALUES (13,15),(13,21),(21,13),(21,15); 65 | /*!40000 ALTER TABLE `friend` ENABLE KEYS */; 66 | UNLOCK TABLES; 67 | 68 | -- 69 | -- Table structure for table `groupuser` 70 | -- 71 | 72 | DROP TABLE IF EXISTS `groupuser`; 73 | /*!40101 SET @saved_cs_client = @@character_set_client */; 74 | /*!40101 SET character_set_client = utf8 */; 75 | CREATE TABLE `groupuser` ( 76 | `groupid` int(11) NOT NULL, 77 | `userid` int(11) NOT NULL, 78 | `grouprole` enum('creator','normal') CHARACTER SET latin1 DEFAULT NULL, 79 | KEY `groupid` (`groupid`,`userid`) 80 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 81 | /*!40101 SET character_set_client = @saved_cs_client */; 82 | 83 | -- 84 | -- Dumping data for table `groupuser` 85 | -- 86 | 87 | LOCK TABLES `groupuser` WRITE; 88 | /*!40000 ALTER TABLE `groupuser` DISABLE KEYS */; 89 | INSERT INTO `groupuser` VALUES (1,13,'creator'),(1,21,'normal'),(1,19,'normal'); 90 | /*!40000 ALTER TABLE `groupuser` ENABLE KEYS */; 91 | UNLOCK TABLES; 92 | 93 | -- 94 | -- Table structure for table `offlinemessage` 95 | -- 96 | 97 | DROP TABLE IF EXISTS `offlinemessage`; 98 | /*!40101 SET @saved_cs_client = @@character_set_client */; 99 | /*!40101 SET character_set_client = utf8 */; 100 | CREATE TABLE `offlinemessage` ( 101 | `userid` int(11) NOT NULL, 102 | `message` varchar(500) NOT NULL 103 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 104 | /*!40101 SET character_set_client = @saved_cs_client */; 105 | 106 | -- 107 | -- Dumping data for table `offlinemessage` 108 | -- 109 | 110 | LOCK TABLES `offlinemessage` WRITE; 111 | /*!40000 ALTER TABLE `offlinemessage` DISABLE KEYS */; 112 | INSERT INTO `offlinemessage` VALUES (19,'{\"groupid\":1,\"id\":21,\"msg\":\"hello\",\"msgid\":10,\"name\":\"gao yang\",\"time\":\"2020-02-22 00:43:59\"}'),(19,'{\"groupid\":1,\"id\":21,\"msg\":\"helo!!!\",\"msgid\":10,\"name\":\"gao yang\",\"time\":\"2020-02-22 22:43:21\"}'),(19,'{\"groupid\":1,\"id\":13,\"msg\":\"hahahahaha\",\"msgid\":10,\"name\":\"zhang san\",\"time\":\"2020-02-22 22:59:56\"}'),(19,'{\"groupid\":1,\"id\":13,\"msg\":\"hahahahaha\",\"msgid\":10,\"name\":\"zhang san\",\"time\":\"2020-02-23 17:59:26\"}'),(19,'{\"groupid\":1,\"id\":21,\"msg\":\"wowowowowow\",\"msgid\":10,\"name\":\"gao yang\",\"time\":\"2020-02-23 17:59:34\"}'); 113 | /*!40000 ALTER TABLE `offlinemessage` ENABLE KEYS */; 114 | UNLOCK TABLES; 115 | 116 | -- 117 | -- Table structure for table `user` 118 | -- 119 | 120 | DROP TABLE IF EXISTS `user`; 121 | /*!40101 SET @saved_cs_client = @@character_set_client */; 122 | /*!40101 SET character_set_client = utf8 */; 123 | CREATE TABLE `user` ( 124 | `id` int(11) NOT NULL AUTO_INCREMENT, 125 | `name` varchar(50) DEFAULT NULL, 126 | `password` varchar(50) DEFAULT NULL, 127 | `state` enum('online','offline') CHARACTER SET latin1 DEFAULT 'offline', 128 | PRIMARY KEY (`id`), 129 | UNIQUE KEY `name` (`name`) 130 | ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8; 131 | /*!40101 SET character_set_client = @saved_cs_client */; 132 | 133 | -- 134 | -- Dumping data for table `user` 135 | -- 136 | 137 | LOCK TABLES `user` WRITE; 138 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; 139 | INSERT INTO `user` VALUES (13,'zhang san','123456','online'),(15,'li si','666666','offline'),(16,'liu shuo','123456','offline'),(18,'wu yang','123456','offline'),(19,'pi pi','123456','offline'),(21,'gao yang','123456','offline'); 140 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; 141 | UNLOCK TABLES; 142 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 143 | 144 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 145 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 146 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 147 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 148 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 149 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 150 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 151 | 152 | -- Dump completed on 2021-07-28 14:36:11 153 | -------------------------------------------------------------------------------- /include/public.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __PROTOCOL_H__ 2 | #define __PROTOCOL_H__ 3 | 4 | // server和client的公共头文件 5 | enum EnMsgType 6 | { 7 | LOGIN_MSG = 1000, // 登录消息 8 | LOGIN_MSG_ACK, // 登录响应消息 9 | LOGINOUT_MSG, // 注销消息 10 | REGISTER_MSG, // 注册消息 11 | REGISTER_MSG_ACK, // 注册响应消息 12 | ONE_CHAT_MSG, // 聊天消息 13 | ADD_FRIEND_MSG, // 添加好友消息 14 | 15 | CREATE_GROUP_MSG, // 创建群组 16 | ADD_GROUP_MSG, // 加入群组 17 | GROUP_CHAT_MSG, // 群聊天 18 | }; 19 | 20 | enum ErrorCode 21 | { 22 | 23 | PASSWORD_ERROR = 2000, 24 | NO_EXIST_USER, 25 | NO_EXIST_Group 26 | }; 27 | 28 | #endif // __PROTOCOL_H__ 29 | 30 | // {"msgid":1,"id":13,"password":"123456"} -------------------------------------------------------------------------------- /include/server/chatserver.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CHATSERVER_H 2 | #define CHATSERVER_H 3 | 4 | #include 5 | #include 6 | using namespace muduo; 7 | using namespace muduo::net; 8 | 9 | // 服务器类,基于muduo库开发 10 | class ChatServer 11 | { 12 | public: 13 | // 初始化聊天服务器对象 14 | ChatServer(EventLoop *loop, 15 | const InetAddress &listenAddr, 16 | const std::string &nameArg); 17 | 18 | // 开启事件循环 19 | void start(); 20 | 21 | private: 22 | // 连接相关信息的回调函数(新连接到来/旧连接断开) 23 | void onConnection(const TcpConnectionPtr &); 24 | 25 | // 读写事件相关信息的回调函数 26 | void onMessage(const TcpConnectionPtr &, 27 | Buffer *, 28 | Timestamp); 29 | 30 | TcpServer _server; 31 | EventLoop *_loop; 32 | }; 33 | 34 | #endif // CHATSERVER_H -------------------------------------------------------------------------------- /include/server/chatservice.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CHATSERVICE_H 2 | #define CHATSERVICE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "json.hpp" 9 | #include "usermodel.hpp" 10 | #include "offlinemessagemodel.hpp" 11 | #include "friendmodel.hpp" 12 | #include "group_model.hpp" 13 | #include "redis.hpp" 14 | 15 | using json = nlohmann::json; 16 | using namespace muduo; 17 | using namespace muduo::net; 18 | 19 | // 回调函数类型 20 | using MsgHandler = std::function; 21 | 22 | // 聊天服务器业务类 23 | class ChatService 24 | { 25 | public: 26 | // ChatService 单例模式 27 | // thread safe 28 | static ChatService* instance() { 29 | static ChatService service; 30 | return &service; 31 | } 32 | 33 | // 登录业务 34 | void loginHandler(const TcpConnectionPtr &conn, json &js, Timestamp time); 35 | // 注册业务 36 | void registerHandler(const TcpConnectionPtr &conn, json &js, Timestamp time); 37 | // 一对一聊天业务 38 | void oneChatHandler(const TcpConnectionPtr &conn, json &js, Timestamp time); 39 | // 添加好友业务 40 | void addFriendHandler(const TcpConnectionPtr &conn, json &js, Timestamp time); 41 | // 获取对应消息的处理器 42 | MsgHandler getHandler(int msgId); 43 | // 创建群组业务 44 | void createGroup(const TcpConnectionPtr &conn, json &js, Timestamp time); 45 | // 加入群组业务 46 | void addGroup(const TcpConnectionPtr &conn, json &js, Timestamp time); 47 | // 群组聊天业务 48 | void groupChat(const TcpConnectionPtr &conn, json &js, Timestamp time); 49 | // 处理客户端异常退出 50 | void clientCloseExceptionHandler(const TcpConnectionPtr &conn); 51 | // 服务端异常终止之后的操作 52 | void reset(); 53 | //redis订阅消息触发的回调函数 54 | void redis_subscribe_message_handler(int channel, string message); 55 | 56 | private: 57 | ChatService(); 58 | ChatService(const ChatService&) = delete; 59 | ChatService& operator=(const ChatService&) = delete; 60 | 61 | // 存储消息id和其对应的业务处理方法 62 | std::unordered_map _msgHandlerMap; 63 | 64 | // 存储在线用户的通信连接 65 | std::unordered_map _userConnMap; 66 | 67 | // 定义互斥锁 68 | std::mutex _connMutex; 69 | 70 | //redis操作对象 71 | Redis _redis; 72 | 73 | // 数据操作类对象 74 | UserModel _userModel; 75 | OfflineMsgModel _offlineMsgModel; 76 | FriendModel _friendModel; 77 | GroupModel _groupModel; 78 | }; 79 | 80 | #endif // CHATSERVICE_H -------------------------------------------------------------------------------- /include/server/db/db.h: -------------------------------------------------------------------------------- 1 | #ifndef DB_H 2 | #define DB_H 3 | 4 | // TODO:封装太简单,可以增加MySQL连接池 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | // 数据库操作类 10 | class MySQL 11 | { 12 | public: 13 | // 初始化数据库连接 14 | MySQL(); 15 | // 释放数据库连接资源 16 | ~MySQL(); 17 | // 连接数据库 18 | bool connect(); 19 | // 更新操作 20 | bool update(string sql); 21 | // 查询操作 22 | MYSQL_RES *query(string sql); 23 | // 获取连接 24 | MYSQL* getConnection(); 25 | 26 | private: 27 | MYSQL *_conn; 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /include/server/model/friendmodel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FRIENDMODEL_H 2 | #define FRIENDMODEL_H 3 | #include "user.hpp" 4 | #include 5 | 6 | // 维护好友信息的操作接口方法 7 | class FriendModel 8 | { 9 | public: 10 | // 添加好友关系 11 | void insert(int userId, int friendId); 12 | 13 | // 返回用户好友列表 14 | std::vector query(int userId); 15 | }; 16 | 17 | #endif // FRIENDMODEL_H -------------------------------------------------------------------------------- /include/server/model/group.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __GROUP_H__ 2 | #define __GROUP_H__ 3 | 4 | #include 5 | #include 6 | #include "group_user.hpp" 7 | 8 | class Group 9 | { 10 | public: 11 | Group(int id = -1, std::string name = "", std::string desc = "") 12 | : _id(id), 13 | _desc(desc), 14 | _name(name) 15 | {} 16 | 17 | void setId(int id) { _id = id; } 18 | void setName(std::string name) { _name = name; } 19 | void setDesc(std::string desc) { _desc = desc; } 20 | 21 | int getId() { return _id; } 22 | std::string getName() { return _name; } 23 | std::string getDesc() { return _desc; } 24 | std::vector &getUsers() { return _users; } 25 | 26 | private: 27 | int _id; 28 | std::string _name; 29 | std::string _desc; 30 | std::vector _users; 31 | }; 32 | 33 | #endif // __GROUP_H__ -------------------------------------------------------------------------------- /include/server/model/group_model.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __GROUP_MODEL_H 2 | #define __GROUP_MODEL_H 3 | 4 | #include "group.hpp" 5 | #include 6 | #include 7 | 8 | class GroupModel 9 | { 10 | public: 11 | // 创建群组 12 | bool createGroup(Group &group); 13 | // 加入群组 14 | void addGroup(int userid, int groupid, std::string role); 15 | // 查询用户所在群组信息 16 | std::vector queryGroups(int userid); 17 | // 根据指定的groupid查询群组用户id列表,除userid自己,主要用户群聊业务给群组其它成员群发消息 18 | std::vector queryGroupUsers(int userid, int groupid); 19 | 20 | }; 21 | 22 | #endif // __GROUP_MODEL_H -------------------------------------------------------------------------------- /include/server/model/group_user.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __GROUP_USER_H__ 2 | #define __GROUP_USER_H__ 3 | 4 | #include "user.hpp" 5 | #include 6 | 7 | // TODO:别继承了,分开比较好 8 | class GroupUser : public User 9 | { 10 | public: 11 | GroupUser() = default; 12 | void setRole(const std::string& role) { _role = role; } 13 | std::string getRole() { return _role; } 14 | 15 | private: 16 | std::string _role; 17 | }; 18 | 19 | 20 | #endif // __GROUP_USER_H__ -------------------------------------------------------------------------------- /include/server/model/offlinemessagemodel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OFFLINE_MESSAGE_MODEL_H 2 | #define OFFLINE_MESSAGE_MODEL_H 3 | 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | // 提供离线消息表的操作接口方法 9 | class OfflineMsgModel 10 | { 11 | public: 12 | // 存储用户的离线消息 13 | void insert(int userId, std::string msg); 14 | 15 | // 删除用户的离线消息 16 | void remove(int userId); 17 | 18 | // 查询用户的离线消息 19 | std::vector query(int userId); 20 | }; 21 | 22 | #endif // OFFLINE_MESSAGE_MODEL_H -------------------------------------------------------------------------------- /include/server/model/user.hpp: -------------------------------------------------------------------------------- 1 | #ifndef USER_H 2 | #define USER_H 3 | 4 | #include 5 | 6 | class User 7 | { 8 | public: 9 | User(int id = -1, std::string name = "", 10 | std::string pwd = "", std::string state = "offline") 11 | : _id(id), 12 | _name(name), 13 | _state(state) 14 | {} 15 | 16 | void setId(const int &id) { _id = id; } 17 | void setName(const std::string &name) { _name = name; } 18 | void setPassword(const std::string &paw) { _password = paw; } 19 | void setState(const std::string &state) { _state = state; } 20 | 21 | int getId() { return _id; } 22 | std::string getName() { return _name; } 23 | std::string getPassword() { return _password; } 24 | std::string getState() { return _state; } 25 | 26 | protected: 27 | int _id; 28 | std::string _name; 29 | std::string _password; 30 | std::string _state; 31 | }; 32 | 33 | 34 | #endif // USER_H -------------------------------------------------------------------------------- /include/server/model/usermodel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef USERMODEL_H 2 | #define USERMODEL_H 3 | 4 | #include "user.hpp" 5 | 6 | class UserModel 7 | { 8 | public: 9 | // User表的插入方法 10 | bool insert(User &user); 11 | 12 | // 根据用户号码查询用户信息 13 | User query(int id); 14 | 15 | // 更新用户的状态信息 16 | bool updateState(User user); 17 | 18 | // 重置用户的状态信息 19 | void resetState(); 20 | }; 21 | 22 | #endif // USERMODEL_H -------------------------------------------------------------------------------- /include/server/redis/redis.hpp: -------------------------------------------------------------------------------- 1 | #ifndef REDIS_H 2 | #define REDIS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | using redis_handler = function; 10 | 11 | class Redis 12 | { 13 | public: 14 | Redis(); 15 | ~Redis(); 16 | 17 | //连接Redis服务器 18 | bool connect(); 19 | 20 | //向Redis指定的通道channel发布消息 21 | bool publish(int channel, string message); 22 | 23 | //向Redis指定的通道subscribe订阅消息 24 | bool subscribe(int channel); 25 | 26 | //取消订阅 27 | bool unsubscribe(int channel); 28 | 29 | //独立线程中接收订阅通道的消息 30 | void observer_channel_message(); 31 | 32 | //初始化业务层上报通道消息的回调对象 33 | void init_notify_handler(redis_handler handler); 34 | 35 | private: 36 | //hiredis同步上下文对象,负责publish消息 37 | redisContext *publish_context_; 38 | 39 | //负责subscribe消息 40 | redisContext *subcribe_context_; 41 | 42 | //回调操作,收到消息给service上报 43 | redis_handler notify_message_handler_; 44 | }; 45 | 46 | #endif -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 加载子目录 2 | add_subdirectory(server) 3 | add_subdirectory(client) -------------------------------------------------------------------------------- /src/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 定义了一个SRC_LIST变量,包含了该目录下所有的源文件 2 | aux_source_directory(. SRC_LIST) 3 | 4 | # 指定生成可执行文件 5 | add_executable(ChatClient ${SRC_LIST}) 6 | # 指定可执行文件链接时需要依赖的库文件 7 | target_link_libraries(ChatClient pthread) -------------------------------------------------------------------------------- /src/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 定义了一个SRC_LIST变量,包含了该目录下所有源文件 2 | aux_source_directory(. SRC_LIST) 3 | aux_source_directory(./db DB_LIST) 4 | aux_source_directory(./model DB_LIST) 5 | aux_source_directory(./redis REDIS_LIST) 6 | 7 | # 指定生成可执行文件 8 | add_executable(ChatServer ${SRC_LIST} ${DB_LIST} ${REDIS_LIST}) 9 | 10 | # 指定可执行文件链接时需要依赖的库文件 11 | target_link_libraries(ChatServer muduo_net muduo_base mysqlclient hiredis pthread) -------------------------------------------------------------------------------- /src/server/chatserver.cpp: -------------------------------------------------------------------------------- 1 | #include "chatserver.hpp" 2 | #include "json.hpp" 3 | #include "chatservice.hpp" 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | using namespace placeholders; 9 | using json = nlohmann::json; 10 | 11 | 12 | // 初始化聊天服务器对象 13 | ChatServer::ChatServer(EventLoop *loop, 14 | const InetAddress &listenAddr, 15 | const string &nameArg) 16 | : _server(loop, listenAddr, nameArg), _loop(loop) 17 | { 18 | // 注册连接事件的回调函数 19 | _server.setConnectionCallback(std::bind(&ChatServer::onConnection, this, _1)); 20 | 21 | // 注册消息事件的回调函数 22 | _server.setMessageCallback(std::bind(&ChatServer::onMessage, this, _1, _2, _3)); 23 | 24 | // 设置subLoop线程数量 25 | _server.setThreadNum(4); 26 | } 27 | 28 | // 启动服务 29 | void ChatServer::start() 30 | { 31 | _server.start(); 32 | } 33 | 34 | // 连接事件相关信息的回调函数 35 | void ChatServer::onConnection(const TcpConnectionPtr &conn) 36 | { 37 | // 客户端断开连接 38 | if (!conn->connected()) 39 | { 40 | // 处理客户端异常退出事件 41 | ChatService::instance()->clientCloseExceptionHandler(conn); 42 | // 半关闭 43 | conn->shutdown(); 44 | } 45 | } 46 | 47 | // 上报读写事件相关信息的回调函数 48 | void ChatServer::onMessage(const TcpConnectionPtr &conn, 49 | Buffer *buffer, 50 | Timestamp time) 51 | { 52 | // 将json数据转换为string 53 | string buf = buffer->retrieveAllAsString(); 54 | // 数据的反序列化 55 | json js = json::parse(buf); 56 | 57 | // 完全解耦网络模块和业务模块,不要在网络模块中调用业务模块的方法 58 | // 通过 js["msg_id"] 来获取不同的业务处理器(事先绑定的回调方法) 59 | // js["msgid"].get() 将js["msgid"]对应的值强制转换成int 60 | auto msgHandler = ChatService::instance()->getHandler(js["msgid"].get()); 61 | // 回调消息绑定好的事件处理器,来执行相应的业务处理 62 | msgHandler(conn, js, time); 63 | } -------------------------------------------------------------------------------- /src/server/chatservice.cpp: -------------------------------------------------------------------------------- 1 | #include "chatservice.hpp" 2 | #include "public.hpp" 3 | #include 4 | #include 5 | #include 6 | using namespace muduo; 7 | using namespace std; 8 | 9 | // int getUserId(json& js) { return js["id"].get(); } 10 | // std::string getUserName(json& js) { return js["name"]; } 11 | 12 | ChatService::ChatService() 13 | { 14 | // 对各类消息处理方法的注册 15 | _msgHandlerMap.insert({LOGIN_MSG, std::bind(&ChatService::loginHandler, this, _1, _2, _3)}); 16 | _msgHandlerMap.insert({REGISTER_MSG, std::bind(&ChatService::registerHandler, this, _1, _2, _3)}); 17 | _msgHandlerMap.insert({ONE_CHAT_MSG, std::bind(&ChatService::oneChatHandler, this, _1, _2, _3)}); 18 | _msgHandlerMap.insert({ADD_FRIEND_MSG, std::bind(&ChatService::addFriendHandler, this, _1, _2, _3)}); 19 | // 群组业务管理相关事件处理回调注册 20 | _msgHandlerMap.insert({CREATE_GROUP_MSG, std::bind(&ChatService::createGroup, this, _1, _2, _3)}); 21 | _msgHandlerMap.insert({ADD_GROUP_MSG, std::bind(&ChatService::addGroup, this, _1, _2, _3)}); 22 | _msgHandlerMap.insert({GROUP_CHAT_MSG, std::bind(&ChatService::groupChat, this, _1, _2, _3)}); 23 | 24 | if (_redis.connect()) 25 | { 26 | _redis.init_notify_handler(std::bind(&ChatService::redis_subscribe_message_handler, this, _1, _2)); 27 | } 28 | } 29 | 30 | // redis订阅消息触发的回调函数,这里channel其实就是id 31 | void ChatService::redis_subscribe_message_handler(int channel, string message) 32 | { 33 | //用户在线 34 | lock_guard lock(_connMutex); 35 | auto it = _userConnMap.find(channel); 36 | if (it != _userConnMap.end()) 37 | { 38 | it->second->send(message); 39 | return; 40 | } 41 | 42 | //转储离线 43 | _offlineMsgModel.insert(channel, message); 44 | } 45 | 46 | MsgHandler ChatService::getHandler(int msgId) 47 | { 48 | // 找不到对应处理器的情况 49 | auto it = _msgHandlerMap.find(msgId); 50 | if (it == _msgHandlerMap.end()) 51 | { 52 | // 返回一个默认的处理器(lambda匿名函数,仅仅用作提示) 53 | return [=](const TcpConnectionPtr &conn, json &js, Timestamp) { 54 | LOG_ERROR << "msgId: " << msgId << " can not find handler!"; 55 | }; 56 | } 57 | 58 | return _msgHandlerMap[msgId]; 59 | } 60 | 61 | // 服务器异常,业务重置方法 62 | void ChatService::reset() 63 | { 64 | // 将所有online状态的用户,设置成offline 65 | _userModel.resetState(); 66 | } 67 | 68 | 69 | /** 70 | * 处理客户端异常退出 71 | */ 72 | void ChatService::clientCloseExceptionHandler(const TcpConnectionPtr &conn) 73 | { 74 | User user; 75 | // 互斥锁保护 76 | { 77 | lock_guard lock(_connMutex); 78 | for (auto it = _userConnMap.begin(); it != _userConnMap.end(); ++it) 79 | { 80 | if (it->second == conn) 81 | { 82 | // 从map表删除用户的链接信息 83 | user.setId(it->first); 84 | _userConnMap.erase(it); 85 | break; 86 | } 87 | } 88 | } 89 | 90 | // 用户注销 91 | _redis.unsubscribe(user.getId()); 92 | 93 | // 更新用户的状态信息 94 | if (user.getId() != -1) 95 | { 96 | user.setState("offline"); 97 | _userModel.updateState(user); 98 | } 99 | } 100 | 101 | // 一对一聊天业务 102 | void ChatService::oneChatHandler(const TcpConnectionPtr &conn, json &js, Timestamp time) 103 | { 104 | // 需要接收信息的用户ID 105 | int toId = js["toid"].get(); 106 | 107 | { 108 | lock_guard lock(_connMutex); 109 | auto it = _userConnMap.find(toId); 110 | // 确认是在线状态 111 | if (it != _userConnMap.end()) 112 | { 113 | // TcpConnection::send() 直接发送消息 114 | it->second->send(js.dump()); 115 | return; 116 | } 117 | } 118 | 119 | // 用户在其他主机的情况,publish消息到redis 120 | User user = _userModel.query(toId); 121 | if (user.getState() == "online") 122 | { 123 | _redis.publish(toId, js.dump()); 124 | return; 125 | } 126 | 127 | // toId 不在线则存储离线消息 128 | _offlineMsgModel.insert(toId, js.dump()); 129 | } 130 | 131 | // 添加朋友业务 132 | void ChatService::addFriendHandler(const TcpConnectionPtr &conn, json &js, Timestamp time) 133 | { 134 | int userId = js["id"].get(); 135 | int friendId = js["friendid"].get(); 136 | 137 | // 存储好友信息 138 | _friendModel.insert(userId, friendId); 139 | } 140 | 141 | // 创建群组业务 142 | void ChatService::createGroup(const TcpConnectionPtr &conn, json &js, Timestamp time) 143 | { 144 | int userId = js["id"].get(); 145 | std::string name = js["groupname"]; 146 | std::string desc = js["groupesc"]; 147 | 148 | // 存储新创建的群组消息 149 | Group group(-1, name, desc); 150 | if (_groupModel.createGroup(group)) 151 | { 152 | // 存储群组创建人信息 153 | _groupModel.addGroup(userId, group.getId(), "creator"); 154 | } 155 | } 156 | 157 | // 加入群组业务 158 | void ChatService::addGroup(const TcpConnectionPtr &conn, json &js, Timestamp time) 159 | { 160 | int userId = js["id"].get(); 161 | int groupId = js["groupid"].get(); 162 | _groupModel.addGroup(userId, groupId, "normal"); 163 | } 164 | 165 | // 群组聊天业务 166 | void ChatService::groupChat(const TcpConnectionPtr &conn, json &js, Timestamp time) 167 | { 168 | int userId = js["id"].get(); 169 | int groupId = js["groupid"].get(); 170 | std::vector userIdVec = _groupModel.queryGroupUsers(userId, groupId); 171 | 172 | lock_guard lock(_connMutex); 173 | for (int id : userIdVec) 174 | { 175 | auto it = _userConnMap.find(id); 176 | if (it != _userConnMap.end()) 177 | { 178 | // 转发群消息 179 | it->second->send(js.dump()); 180 | } 181 | else 182 | { 183 | // 查询toid是否在线 184 | User user = _userModel.query(id); 185 | if (user.getState() == "online") 186 | { 187 | // 向群组成员publish信息 188 | _redis.publish(id, js.dump()); 189 | } 190 | else 191 | { 192 | //转储离线消息 193 | _offlineMsgModel.insert(id, js.dump()); 194 | } 195 | } 196 | } 197 | } 198 | 199 | /** 200 | * 登录业务 201 | * 从json得到用户id 202 | * 从数据中获取此id的用户,判断此用户的密码是否等于json获取到的密码 203 | * 判断用户是否重复登录 204 | * {"msgid":1,"id":13,"password":"123456"} 205 | * {"errmsg":"this account is using, input another!","errno":2,"msgid":2} 206 | */ 207 | void ChatService::loginHandler(const TcpConnectionPtr &conn, json &js, Timestamp time) 208 | { 209 | LOG_DEBUG << "do login service!"; 210 | 211 | int id = js["id"].get(); 212 | std::string password = js["password"]; 213 | 214 | User user = _userModel.query(id); 215 | if (user.getId() == id && user.getPassword() == password) 216 | { 217 | if (user.getState() == "online") 218 | { 219 | // 该用户已经登录,不能重复登录 220 | json response; 221 | response["msgid"] = LOGIN_MSG_ACK; 222 | response["errno"] = 2; 223 | response["errmsg"] = "this account is using, input another!"; 224 | conn->send(response.dump()); 225 | } 226 | else 227 | { 228 | // 登录成功,记录用户连接信息 229 | // 需要考虑线程安全问题 onMessage会在不同线程中被调用 230 | { 231 | lock_guard lock(_connMutex); 232 | _userConnMap.insert({id, conn}); 233 | } 234 | 235 | // id用户登录成功后,向redis订阅channel(id) 236 | _redis.subscribe(id); 237 | 238 | // 登录成功,更新用户状态信息 state offline => online 239 | user.setState("online"); 240 | _userModel.updateState(user); 241 | 242 | json response; 243 | response["msgid"] = LOGIN_MSG_ACK; 244 | response["errno"] = 0; 245 | response["id"] = user.getId(); 246 | response["name"] = user.getName(); 247 | 248 | // 查询该用户是否有离线消息 249 | std::vector vec = _offlineMsgModel.query(id); 250 | if (!vec.empty()) 251 | { 252 | response["offlinemsg"] = vec; 253 | // 读取该用户的离线消息后,将该用户离线消息删除掉 254 | _offlineMsgModel.remove(id); 255 | } 256 | else 257 | { 258 | LOG_INFO << "无离线消息"; 259 | } 260 | 261 | std::vector userVec = _friendModel.query(id); 262 | if (!userVec.empty()) 263 | { 264 | std::vector vec; 265 | for (auto& user : userVec) 266 | { 267 | json js; 268 | js["id"] = user.getId(); 269 | js["name"] = user.getName(); 270 | js["state"] = user.getState(); 271 | vec.push_back(js.dump()); 272 | } 273 | response["friends"] = vec; 274 | } 275 | 276 | conn->send(response.dump()); 277 | } 278 | } 279 | 280 | } 281 | 282 | // 注册业务 283 | void ChatService::registerHandler(const TcpConnectionPtr &conn, json &js, Timestamp time) 284 | { 285 | LOG_DEBUG << "do regidster service!"; 286 | 287 | std::string name = js["name"]; 288 | std::string password = js["password"]; 289 | 290 | User user; 291 | user.setName(name); 292 | user.setPassword(password); 293 | bool state = _userModel.insert(user); 294 | if (state) 295 | { 296 | // 注册成功 297 | json response; 298 | response["msgid"] = REGISTER_MSG_ACK; 299 | response["errno"] = 0; 300 | response["id"] = user.getId(); 301 | // json::dump() 将序列化信息转换为std::string 302 | conn->send(response.dump()); 303 | } 304 | else 305 | { 306 | // 注册失败 307 | json response; 308 | response["msgid"] = REGISTER_MSG_ACK; 309 | response["errno"] = 1; 310 | // 注册已经失败,不需要在json返回id 311 | conn->send(response.dump()); 312 | } 313 | } 314 | 315 | -------------------------------------------------------------------------------- /src/server/db/db.cpp: -------------------------------------------------------------------------------- 1 | #include "db.h" 2 | #include 3 | 4 | // 数据库配置信息 5 | static const string server = "127.0.0.1"; 6 | static const string user = "root"; 7 | static const string password = "200166_Shangjkld"; 8 | static const string dbname = "chat"; 9 | 10 | // 初始化数据库连接 11 | MySQL::MySQL() 12 | { 13 | _conn = mysql_init(nullptr); 14 | } 15 | 16 | // 释放数据库连接资源 17 | MySQL::~MySQL() 18 | { 19 | if (_conn != nullptr) { 20 | mysql_close(_conn); 21 | } 22 | } 23 | 24 | // 连接数据库 25 | bool MySQL::connect() 26 | { 27 | MYSQL *p = mysql_real_connect(_conn, server.c_str(), user.c_str(), 28 | password.c_str(), dbname.c_str(), 3306, nullptr, 0); 29 | if (p != nullptr) 30 | { 31 | // C和C++代码默认的编码字符是ASCII,如果不设置,从MySQL上拉下来的中文显示? 32 | mysql_query(_conn, "set names gbk"); 33 | } 34 | else 35 | { 36 | LOG_INFO << "connect mysql failed!"; 37 | } 38 | 39 | return p; 40 | } 41 | 42 | // 更新操作 43 | bool MySQL::update(string sql) 44 | { 45 | if (mysql_query(_conn, sql.c_str())) 46 | { 47 | LOG_INFO << __FILE__ << ":" << __LINE__ << ":" 48 | << sql << "更新失败!"; 49 | return false; 50 | } 51 | 52 | return true; 53 | } 54 | 55 | // 查询操作 56 | MYSQL_RES *MySQL::query(string sql) 57 | { 58 | if (mysql_query(_conn, sql.c_str())) 59 | { 60 | LOG_INFO << __FILE__ << ":" << __LINE__ << ":" 61 | << sql << "查询失败!"; 62 | return nullptr; 63 | } 64 | 65 | return mysql_use_result(_conn); 66 | } 67 | 68 | // 获取连接 69 | MYSQL* MySQL::getConnection() 70 | { 71 | return _conn; 72 | } -------------------------------------------------------------------------------- /src/server/main.cpp: -------------------------------------------------------------------------------- 1 | #include "chatserver.hpp" 2 | #include "chatservice.hpp" 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | // 捕获SIGINT的处理函数 9 | void resetHandler(int) 10 | { 11 | LOG_INFO << "capture the SIGINT, will reset state\n"; 12 | ChatService::instance()->reset(); 13 | exit(0); 14 | } 15 | 16 | int main(int argc, char **argv) 17 | { 18 | // if (argc < 3) 19 | // { 20 | // cerr << "command invalid! example: ./ChatServer 127.0.0.1 6000" << endl; 21 | // exit(-1); 22 | // } 23 | 24 | // // 解析通过命令行参数传递的ip和port 25 | // char *ip = argv[1]; 26 | // uint16_t port = atoi(argv[2]); 27 | 28 | signal(SIGINT, resetHandler); 29 | 30 | EventLoop loop; 31 | InetAddress addr("127.0.0.1", atoi(argv[1])); 32 | ChatServer server(&loop, addr, "ChatServer"); 33 | 34 | server.start(); 35 | loop.loop(); 36 | 37 | return 0; 38 | } -------------------------------------------------------------------------------- /src/server/model/friendmodel.cpp: -------------------------------------------------------------------------------- 1 | #include "friendmodel.hpp" 2 | #include "db.h" 3 | 4 | // 添加好友关系 5 | void FriendModel::insert(int userId, int friendId) 6 | { 7 | // 组织sql语句 8 | char sql[1024] = {0}; 9 | snprintf(sql, sizeof(sql), "insert into friend values(%d, %d)", userId, friendId); 10 | 11 | MySQL mysql; 12 | if (mysql.connect()) 13 | { 14 | mysql.update(sql); 15 | } 16 | } 17 | 18 | // 返回用户好友列表 19 | std::vector FriendModel::query(int userId) 20 | { 21 | // 1.组装sql语句 22 | char sql[1024] = {0}; 23 | 24 | // 联合查询 25 | sprintf(sql, "select a.id, a.name, a.state from user a inner join friend b on b.friendid = a.id where b.userid=%d", userId); 26 | 27 | std::vector vec; 28 | MySQL mysql; 29 | if (mysql.connect()) 30 | { 31 | MYSQL_RES *res = mysql.query(sql); 32 | if (res != nullptr) 33 | { 34 | // 把userid用户的所有离线消息放入vec中返回 35 | MYSQL_ROW row; 36 | while ((row = mysql_fetch_row(res)) != nullptr) 37 | { 38 | User user; 39 | user.setId(atoi(row[0])); 40 | user.setName(row[1]); 41 | user.setState(row[2]); 42 | vec.push_back(user); 43 | } 44 | mysql_free_result(res); 45 | return vec; 46 | } 47 | } 48 | return vec; 49 | } 50 | -------------------------------------------------------------------------------- /src/server/model/groupmodel.cpp: -------------------------------------------------------------------------------- 1 | #include "group_model.hpp" 2 | #include "db.h" 3 | 4 | // 创建群组(设置群组名字和描述) 5 | bool GroupModel::createGroup(Group &group) 6 | { 7 | // insert into allgroup(groupname, groupdesc) values('chat-server', 'test for create group2'); 8 | char sql[1024] = {0}; 9 | snprintf(sql, sizeof(sql), "insert into allgroup(groupname, groupdesc) values('%s', '%s')", 10 | group.getName().c_str(), group.getDesc().c_str()); 11 | 12 | MySQL mysql; 13 | if (mysql.connect()) 14 | { 15 | if (mysql.update(sql)) 16 | { 17 | group.setId(mysql_insert_id(mysql.getConnection())); 18 | return true; 19 | } 20 | } 21 | 22 | return false; 23 | } 24 | 25 | // 加入群组(用户ID 加入群组ID 在群组角色) 26 | void GroupModel::addGroup(int userid, int groupid, std::string role) 27 | { 28 | char sql[1024] = {0}; 29 | snprintf(sql, sizeof(sql), "insert into groupuser values(%d, %d, '%s')", 30 | groupid, userid, role.c_str()); 31 | 32 | MySQL mysql; 33 | if (mysql.connect()) 34 | { 35 | mysql.update(sql); 36 | } 37 | } 38 | 39 | // 查询用户所在群组信息 40 | std::vector GroupModel::queryGroups(int userid) 41 | { 42 | /** 43 | * // TODO:MySQL联表查询 44 | * 1. 先根据userid在groupuser表中查询出该用户所属的群组信息 45 | * 2. 再根据群组信息,查询属于该群组的所有用户的userid,并且和user表进行多表联合查询,查出用户的详细信息 46 | */ 47 | char sql[1024] = {0}; 48 | snprintf(sql, sizeof(sql), "select a.id,a.groupname,a.groupdesc from allgroup a inner join \ 49 | groupuser b on a.id = b.groupid where b.userid=%d", 50 | userid); 51 | 52 | std::vector groupVec; 53 | 54 | MySQL mysql; 55 | if (mysql.connect()) 56 | { 57 | MYSQL_RES *res = mysql.query(sql); 58 | if (res != nullptr) 59 | { 60 | MYSQL_ROW row; 61 | // 查出userid所有的群组信息 62 | while ((row = mysql_fetch_row(res)) != nullptr) 63 | { 64 | Group group; 65 | group.setId(atoi(row[0])); 66 | group.setName(row[1]); 67 | group.setDesc(row[2]); 68 | groupVec.push_back(group); 69 | } 70 | mysql_free_result(res); 71 | } 72 | } 73 | 74 | // 查询群组的用户信息 75 | for (Group &group : groupVec) 76 | { 77 | snprintf(sql, sizeof(sql), "select a.id,a.name,a.state,b.grouprole from user a \ 78 | inner join groupuser b on b.userid = a.id where b.groupid=%d", 79 | group.getId()); 80 | 81 | MYSQL_RES *res = mysql.query(sql); 82 | if (res != nullptr) 83 | { 84 | MYSQL_ROW row; 85 | while ((row = mysql_fetch_row(res)) != nullptr) 86 | { 87 | GroupUser user; 88 | user.setId(atoi(row[0])); 89 | user.setName(row[1]); 90 | user.setState(row[2]); 91 | user.setRole(row[3]); 92 | group.getUsers().push_back(user); 93 | } 94 | mysql_free_result(res); 95 | } 96 | } 97 | return groupVec; 98 | } 99 | 100 | // 根据指定的groupid查询群组用户id列表,除userid自己,主要用户群聊业务给群组其它成员群发消息 101 | std::vector GroupModel::queryGroupUsers(int userid, int groupid) 102 | { 103 | char sql[1024] = {0}; 104 | sprintf(sql, "select userid from groupuser where groupid = %d and userid != %d", groupid, userid); 105 | 106 | vector idVec; 107 | MySQL mysql; 108 | if (mysql.connect()) 109 | { 110 | MYSQL_RES *res = mysql.query(sql); 111 | if (res != nullptr) 112 | { 113 | MYSQL_ROW row; 114 | while ((row = mysql_fetch_row(res)) != nullptr) 115 | { 116 | idVec.push_back(atoi(row[0])); 117 | } 118 | mysql_free_result(res); 119 | } 120 | } 121 | return idVec; 122 | } -------------------------------------------------------------------------------- /src/server/model/offlinemessagemodel.cpp: -------------------------------------------------------------------------------- 1 | #include "offlinemessagemodel.hpp" 2 | #include "db.h" 3 | 4 | // 存储用户的离线消息 5 | void OfflineMsgModel::insert(int userId, std::string msg) 6 | { 7 | // 组织sql语句 8 | char sql[1024] = {0}; 9 | snprintf(sql, sizeof(sql), "insert into offlinemessage values(%d, '%s')", userId, msg.c_str()); 10 | 11 | MySQL mysql; 12 | if (mysql.connect()) 13 | { 14 | mysql.update(sql); 15 | } 16 | } 17 | 18 | // 删除用户的离线消息 19 | void OfflineMsgModel::remove(int userId) 20 | { 21 | // 组织sql语句 22 | char sql[1024] = {0}; 23 | snprintf(sql, sizeof(sql), "delete from offlinemessage where userid=%d", userId); 24 | 25 | MySQL mysql; 26 | if (mysql.connect()) 27 | { 28 | mysql.update(sql); 29 | } 30 | } 31 | 32 | // 查询用户的离线消息 33 | std::vector OfflineMsgModel::query(int userId) 34 | { 35 | // 组织sql语句 36 | char sql[1024] = {0}; 37 | snprintf(sql, sizeof(sql), "select message from offlinemessage where userid = %d", userId); 38 | 39 | std::vector vec; 40 | MySQL mysql; 41 | if (mysql.connect()) 42 | { 43 | MYSQL_RES *res = mysql.query(sql); 44 | if (res != nullptr) 45 | { 46 | // 把userid用户的所有消息放入vec中返回 47 | MYSQL_ROW row; 48 | while ((row = mysql_fetch_row(res)) != nullptr) 49 | { 50 | vec.push_back(row[0]); 51 | } 52 | mysql_free_result(res); 53 | return vec; 54 | } 55 | } 56 | return vec; 57 | } 58 | -------------------------------------------------------------------------------- /src/server/model/usermodel.cpp: -------------------------------------------------------------------------------- 1 | #include "usermodel.hpp" 2 | #include "db.h" 3 | #include 4 | 5 | bool UserModel::insert(User& user) 6 | { 7 | // 组装sql语句 8 | char sql[1024] = {0}; 9 | snprintf(sql, sizeof(sql), "insert into user(name, password, state) values('%s', '%s', '%s')", 10 | user.getName().c_str(), user.getPassword().c_str(), user.getState().c_str()); 11 | 12 | MySQL mysql; 13 | if (mysql.connect()) 14 | { 15 | if (mysql.update(sql)) 16 | { 17 | user.setId(mysql_insert_id(mysql.getConnection())); 18 | return true; 19 | } 20 | } 21 | 22 | return false; 23 | } 24 | 25 | // 根据用户号码查询用户信息 26 | User UserModel::query(int id) 27 | { 28 | char sql[1024] = {0}; 29 | snprintf(sql, sizeof(sql), "select * from user where id = %d", id); 30 | 31 | MySQL mysql; 32 | if (mysql.connect()) 33 | { 34 | MYSQL_RES *res = mysql.query(sql); 35 | if (res != nullptr) 36 | { 37 | MYSQL_ROW row = mysql_fetch_row(res); 38 | if (row != nullptr) 39 | { 40 | // 生成一个User对象,填入信息 41 | User user; 42 | user.setId(atoi(row[0])); 43 | user.setName(row[1]); 44 | user.setPassword(row[2]); 45 | user.setState(row[3]); 46 | mysql_free_result(res); 47 | return user; 48 | } 49 | } 50 | 51 | } 52 | 53 | // 返回空User 54 | return User(); 55 | } 56 | 57 | bool UserModel::updateState(User user) 58 | { 59 | char sql[1024] = {0}; 60 | snprintf(sql, sizeof(sql), "update user set state = '%s' where id =%d", user.getState().c_str(), user.getId()); 61 | 62 | MySQL mysql; 63 | if (mysql.connect()) 64 | { 65 | if (mysql.update(sql)) 66 | { 67 | return true; 68 | } 69 | } 70 | return false; 71 | } 72 | 73 | // 重置用户的状态信息 74 | void UserModel::resetState() 75 | { 76 | // 1.组装sql语句 77 | char sql[1024] = "update user set state = 'offline' where state = 'online'"; 78 | 79 | MySQL mysql; 80 | if (mysql.connect()) 81 | { 82 | mysql.update(sql); 83 | } 84 | } -------------------------------------------------------------------------------- /src/server/redis/redis.cpp: -------------------------------------------------------------------------------- 1 | #include "redis.hpp" 2 | #include 3 | 4 | Redis::Redis() : publish_context_(nullptr), subcribe_context_(nullptr) 5 | { 6 | } 7 | 8 | Redis::~Redis() 9 | { 10 | if (publish_context_ != nullptr) 11 | { 12 | redisFree(publish_context_); 13 | } 14 | 15 | if (subcribe_context_ != nullptr) 16 | { 17 | redisFree(subcribe_context_); 18 | } 19 | } 20 | 21 | //连接Redis服务器 22 | bool Redis::connect() 23 | { 24 | publish_context_ = redisConnect("127.0.0.1", 6379); 25 | if (publish_context_ == nullptr) 26 | { 27 | cerr << "connect redis failed!" << endl; 28 | return false; 29 | } 30 | 31 | subcribe_context_ = redisConnect("127.0.0.1", 6379); 32 | if (subcribe_context_ == nullptr) 33 | { 34 | cerr << "connect redis failed!" << endl; 35 | return false; 36 | } 37 | 38 | // 独立线程中接收订阅通道的消息 39 | thread t([&]() { 40 | observer_channel_message(); 41 | }); 42 | t.detach(); 43 | 44 | cout << "connect redis-server success!" << endl; 45 | return true; 46 | } 47 | 48 | //向Redis指定的通道channel发布消息 49 | bool Redis::publish(int channel, string message) 50 | { 51 | // 相当于publish 键 值 52 | // redis 127.0.0.1:6379> PUBLISH runoobChat "Redis PUBLISH test" 53 | redisReply *reply = (redisReply *)redisCommand(publish_context_, "PUBLISH %d %s", channel, message.c_str()); 54 | if (reply == nullptr) 55 | { 56 | cerr << "publish command failed!" << endl; 57 | return false; 58 | } 59 | 60 | // 释放资源 61 | freeReplyObject(reply); 62 | return true; 63 | } 64 | 65 | // 向Redis指定的通道subscribe订阅消息 66 | bool Redis::subscribe(int channel) 67 | { 68 | // redisCommand 会先把命令缓存到context中,然后调用RedisAppendCommand发送给redis 69 | // redis执行subscribe是阻塞,不会响应,不会给我们一个reply 70 | // redis 127.0.0.1:6379> SUBSCRIBE runoobChat 71 | if (REDIS_ERR == redisAppendCommand(subcribe_context_, "SUBSCRIBE %d", channel)) 72 | { 73 | cerr << "subscibe command failed" << endl; 74 | return false; 75 | } 76 | 77 | int done = 0; 78 | while (!done) 79 | { 80 | if (REDIS_ERR == redisBufferWrite(subcribe_context_, &done)) 81 | { 82 | cerr << "subscribe command failed" << endl; 83 | return false; 84 | } 85 | } 86 | 87 | return true; 88 | } 89 | 90 | //取消订阅 91 | bool Redis::unsubscribe(int channel) 92 | { 93 | //redisCommand 会先把命令缓存到context中,然后调用RedisAppendCommand发送给redis 94 | //redis执行subscribe是阻塞,不会响应,不会给我们一个reply 95 | if (REDIS_ERR == redisAppendCommand(subcribe_context_, "UNSUBSCRIBE %d", channel)) 96 | { 97 | cerr << "subscibe command failed" << endl; 98 | return false; 99 | } 100 | 101 | int done = 0; 102 | while (!done) 103 | { 104 | if (REDIS_ERR == redisBufferWrite(subcribe_context_, &done)) 105 | { 106 | cerr << "subscribe command failed" << endl; 107 | return false; 108 | } 109 | } 110 | 111 | return true; 112 | } 113 | 114 | //独立线程中接收订阅通道的消息 115 | void Redis::observer_channel_message() 116 | { 117 | redisReply *reply = nullptr; 118 | while (REDIS_OK == redisGetReply(subcribe_context_, (void **)&reply)) 119 | { 120 | //reply里面是返回的数据有三个,0. message , 1.通道号,2.消息 121 | if (reply != nullptr && reply->element[2] != nullptr && reply->element[2]->str != nullptr) 122 | { 123 | //给业务层上报消息 124 | notify_message_handler_(atoi(reply->element[1]->str), reply->element[2]->str); 125 | } 126 | 127 | freeReplyObject(reply); 128 | } 129 | 130 | cerr << "----------------------- oberver_channel_message quit--------------------------" << endl; 131 | } 132 | 133 | //初始化业务层上报通道消息的回调对象 134 | void Redis::init_notify_handler(redis_handler handler) 135 | { 136 | notify_message_handler_ = handler; 137 | } 138 | --------------------------------------------------------------------------------