07 2021 档案

c++替换string内所有符合条件的子串
摘要:std::size_t replaceAll(string& inout, string what, string with) { std::size_t count{}; for (std::string::size_type pos{}; inout.npos != (pos = inout.f 阅读全文

posted @ 2021-07-30 16:07 平ping 阅读(79) 评论(0) 推荐(0)

epoll学习代码
摘要:服务端server #include <head.h> int setNonBlock(int fd) { int status = 0; status = fcntl(fd, F_GETFL); status |= O_NONBLOCK; //把文件描述符设置为非阻性的 fcntl(fd, F_S 阅读全文

posted @ 2021-07-28 21:57 平ping 阅读(107) 评论(0) 推荐(0)