⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.h

📁 一个很好用的解析
💻 H
字号:
#ifndef SERVER_H_INCLUDED#define SERVER_H_INCLUDED#include <sys/types.h>#include "xmlrpc-c/abyss.h"#include "file.h"#include "data.h"typedef struct _Tsocket Tsocket;struct _TServer {    abyss_bool terminationRequested;        /* User wants this server to terminate as soon as possible,           in particular before accepting any more connections and without           waiting for any.        */    abyss_bool socketBound;        /* The listening socket exists and is bound to a local address           (may already be listening as well)        */    TSocket * listenSocketP;        /* Meaningful only when 'socketBound' is true: file descriptor of           the listening socket ("listening socket" means socket for listening,           not a socket that is listening right now).        */    abyss_bool weCreatedListenSocket;        /* We created the listen socket (whose fd is 'listensock'), as           opposed to 1) User supplied it; or 2) there isn't one.        */    const char * logfilename;    abyss_bool logfileisopen;    TFile logfile;    TMutex logmutex;    const char * name;    const char * filespath;    abyss_bool serverAcceptsConnections;        /* We listen for and accept TCP connections for HTTP transactions.           (The alternative is the user supplies a TCP-connected socket           for each transaction)        */    uint16_t port;        /* Meaningful only when 'socketBound' is false: port number to which           we should bind the listening socket        */    uint32_t keepalivetimeout;    uint32_t keepalivemaxconn;    uint32_t timeout;        /* Maximum time in seconds the server will wait to read a header           or a data chunk from the socket.        */    TList handlers;    TList defaultfilenames;    void * defaulthandler;    abyss_bool advertise;    MIMEType * mimeTypeP;        /* NULL means to use the global MIMEType object */    abyss_bool useSigchld;        /* Meaningless if not using forking for threads.           TRUE means user will call ServerHandleSigchld to indicate that           a SIGCHLD signal was received, and server shall use that as its           indication that a child has died.  FALSE means server will not           be aware of SIGCHLD and will instead poll for existence of PIDs           to determine if a child has died.        */#ifndef WIN32    uid_t uid;    gid_t gid;    TFile pidfile;#endif};voidServerBackgroundProcessComplete(pid_t const pid);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -