Definition at line 36 of file ipc.h.
int IPC::acceptLoop |
( |
void * |
ptr | ) |
|
|
static |
Definition at line 91 of file ipc.cpp.
96 IPC *
const ipc1 =
reinterpret_cast<IPC*
>(ptr);
97 const int max_length = 1024;
113 char data[max_length] = {0};
122 std::string req(
data);
133 const std::string resp =
strprintf(
"[%u] %s\n",
136 const char *
const respc = resp.c_str();
137 const int len =
CAST_S32(strlen(respc)) + 1;
void log_r(const char *const log_text,...)
std::string trim(std::string const &str)
::SDLNet_SocketSet SocketSet
int send(const TcpNet::Socket sock, const void *const data, const int len)
void freeSocketSet(const TcpNet::SocketSet set)
int socketReady(const TcpNet::Socket sock)
int addSocket(const TcpNet::SocketSet set, const TcpNet::Socket sock)
SocketSet allocSocketSet(const int maxsockets)
int checkSockets(const TcpNet::SocketSet set, const Uint32 timeout)
int recv(const TcpNet::Socket sock, void *const data, const int maxlen)
TcpNet::Socket accept(const TcpNet::Socket sock)
std::string strprintf(const char *const format,...)
References TcpNet::accept(), TcpNet::addSocket(), TcpNet::allocSocketSet(), CAST_S32, TcpNet::checkSockets(), TcpNet::closeSocket(), data, TcpNet::freeSocketSet(), TcpNet::getError(), Logger::log_r(), logger, mDelayedCommands, mListen, mMutex, mNumReqs, mSocket, mThread, mThreadLocked, TcpNet::recv(), TcpNet::send(), TcpNet::socketReady(), strprintf(), and Catch::trim().
Referenced by init().