abyss_bool ServerCreateNoAccept(TServer *const serverP, const char *const name, const char *const filesPath, const char *const logFileName) { bool const noAcceptTrue = TRUE; bool const userChanSwitchFalse = FALSE; bool success; const char *error; createServer(&serverP->srvP, noAcceptTrue, NULL, userChanSwitchFalse, 0, &error); if (error) { TraceMsg(error); success = FALSE; xmlrpc_strfree(error); } else { success = TRUE; setNamePathLog(serverP, name, filesPath, logFileName); } return success; }
abyss_bool ServerCreate(TServer * const serverP, const char * const name, uint16_t const portNumber, const char * const filesPath, const char * const logFileName) { abyss_bool const noAcceptFalse = FALSE; abyss_bool success; const char * error; createServer(&serverP->srvP, noAcceptFalse, NULL, portNumber, &error); if (error) { TraceMsg(error); xmlrpc_strfree(error); success = FALSE; } else { success = TRUE; setNamePathLog(serverP, name, filesPath, logFileName); } return success; }
abyss_bool ServerCreateSocket(TServer * const serverP, const char * const name, TOsSocket const socketFd, const char * const filesPath, const char * const logFileName) { abyss_bool success; TSocket * socketP; createSocketFromOsSocket(socketFd, &socketP); if (socketP) { abyss_bool const noAcceptFalse = FALSE; const char * error; createServer(&serverP->srvP, noAcceptFalse, socketP, 0, &error); if (error) { TraceMsg(error); success = FALSE; xmlrpc_strfree(error); } else { success = TRUE; setNamePathLog(serverP, name, filesPath, logFileName); } } else success = FALSE; return success; }
abyss_bool ServerCreateSocket(TServer * const serverP, const char * const name, TOsSocket const socketFd, const char * const filesPath, const char * const logFileName) { bool success; TChanSwitch * chanSwitchP; const char * error; createSwitchFromOsSocket(socketFd, &chanSwitchP, &error); if (error) { TraceMsg(error); success = FALSE; xmlrpc_strfree(error); } else { bool const noAcceptFalse = FALSE; bool const userChanSwitchFalse = FALSE; const char * error; createServer(&serverP->srvP, noAcceptFalse, chanSwitchP, userChanSwitchFalse, 0, &error); if (error) { TraceMsg(error); success = FALSE; xmlrpc_strfree(error); } else { success = TRUE; setNamePathLog(serverP, name, filesPath, logFileName); } if (!success) ChanSwitchDestroy(chanSwitchP); } return success; }