30dayMakeCppServer icon indicating copy to clipboard operation
30dayMakeCppServer copied to clipboard

30天自制C++服务器,包含教程和源代码

Results 60 30dayMakeCppServer issues
Sort by recently updated
recently updated
newest added

快点更新啊!!!!!!

```cpp #include #include #include #include #include using namespace std; void errif(bool condition, const char *errmsg){ if(condition){ perror(errmsg); exit(EXIT_FAILURE); } } int main() { // 创建 socket int sockfd = socket(AF_INET,...

博主为什么不发新的了?

我的运行环境是vmware运行的centos7,使用make编译时显示“printf在此作用域中尚未声明”与“scanf在此作用域中尚未声明”,后在client.cpp与server.cpp中加入#include 后问题解决。

你好,请问我已经选择了linux 系统,但是编译还是会报错,似乎Vhannel 类没有被定义?

Server::Server(EventLoop *_loop) : mainReactor(_loop), acceptor(nullptr){ acceptor = new Acceptor(mainReactor); std::function cb = std::bind(&Server::newConnection, this, std::placeholders::_1); acceptor->setNewConnectionCallback(cb); int size = std::thread::hardware_concurrency(); thpool = new ThreadPool(size); for(int i = 0; i <...

快更新呀快更新呀

`Server::Server(EventLoop *_loop) : mainReactor(_loop), acceptor(nullptr){ acceptor = new Acceptor(mainReactor);//主反应堆,用来处理连接事件 std::function cb = std::bind(&Server::newConnection, this, std::placeholders::_1); acceptor->setNewConnectionCallback(cb); int size = std::thread::hardware_concurrency(); thpool = new ThreadPool(size); for(int i = 0; i <...