summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ba88b01)
одного із буферів iov при читанні
//-----------------------------------------------------------------------------
void * LISTENER::Run(void * d)
{
//-----------------------------------------------------------------------------
void * LISTENER::Run(void * d)
{
-LISTENER * ia = static_cast<LISTENER *>(d);
+LISTENER * listener = static_cast<LISTENER *>(d);
//-----------------------------------------------------------------------------
void * LISTENER::RunProcessor(void * d)
{
//-----------------------------------------------------------------------------
void * LISTENER::RunProcessor(void * d)
{
-LISTENER * ia = static_cast<LISTENER *>(d);
+LISTENER * listener = static_cast<LISTENER *>(d);
+listener->ProcessorRunner();
-printfd(__FILE__, "Port: %d\n", port);
-
struct sockaddr_in listenAddr;
listenAddr.sin_family = AF_INET;
listenAddr.sin_port = htons(port);
struct sockaddr_in listenAddr;
listenAddr.sin_family = AF_INET;
listenAddr.sin_port = htons(port);
iov[0].iov_base = reinterpret_cast<char *>(&packetHead);
iov[0].iov_len = sizeof(packetHead);
iov[1].iov_base = buffer;
iov[0].iov_base = reinterpret_cast<char *>(&packetHead);
iov[0].iov_len = sizeof(packetHead);
iov[1].iov_base = buffer;
-iov[1].iov_len = sizeof(buffer);
+iov[1].iov_len = sizeof(buffer) - sizeof(packetHead);
size_t dataLen = 0;
while (dataLen < sizeof(buffer))
size_t dataLen = 0;
while (dataLen < sizeof(buffer))
}
std::stringstream params;
}
std::stringstream params;
-params << data.login << " "
+params << "\"" << data.login << "\" "
<< inet_ntostring(data.ip) << " "
<< data.id << " "
<< (char *)packetTail.params;
<< inet_ntostring(data.ip) << " "
<< data.id << " "
<< (char *)packetTail.params;