Ai
1 Star 0 Fork 0

wangcichen/urbackup_backend

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
AcceptThread.h 856 Bytes
一键复制 编辑 原始数据 按行查看 历史
Martin 提交于 2019-08-16 02:26 +08:00 . Improve error handling if e.g. bind() call fails
#include <vector>
#include "socket_header.h"
#include "types.h"
#include "libfastcgi/fastcgi.hpp"
class CSelectThread;
class CClient;
class CAcceptThread
{
public:
CAcceptThread(unsigned int nWorkerThreadsPerMaster, unsigned short int uPort);
~CAcceptThread();
void operator()(bool single=false);
bool has_error(void);
private:
void AddToSelectThread(CClient *client);
bool init_socket_v4(unsigned short port);
bool init_socket_v6(unsigned short port);
std::vector<CSelectThread*> SelectThreads;
SOCKET s;
SOCKET s_v6;
unsigned int WorkerThreadsPerMaster;
bool error;
};
class OutputCallback : public FCGIProtocolDriver::OutputCallback
{
public:
virtual ~OutputCallback();
OutputCallback(SOCKET fd_);
virtual void operator() (const void* buf, size_t count);
private:
SOCKET fd;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/wangcichen/urbackup_backend.git
git@gitee.com:wangcichen/urbackup_backend.git
wangcichen
urbackup_backend
urbackup_backend
dev

搜索帮助