0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Merge branch 'develop' of https://github.com/yse/easy_profiler into develop

This commit is contained in:
Victor Zarubkin 2016-09-21 22:09:09 +03:00
commit 79e503983c
2 changed files with 5 additions and 11 deletions

View File

@ -1068,12 +1068,6 @@ void EasyMainWindow::readTcpData()
}
if (m_receivedProfileData.str().size() > necessarySize)
{
qInfo() << "recieve more than necessary d=" << m_receivedProfileData.str().size() - necessarySize;
}
if (m_recFrames)
{
m_receivedProfileData.write(data.data(), data.size());

View File

@ -165,7 +165,7 @@ int EasySocket::send(const void *buf, size_t nbyte)
if(!checkSocket(m_replySocket)) return -1;
int res = 0;
#ifdef _WIN32
res = ::send(m_replySocket, (const char*)buf, nbyte, 0);
res = ::send(m_replySocket, (const char*)buf, (int)nbyte, 0);
#else
res = ::write(m_replySocket,buf,nbyte);
#endif
@ -178,7 +178,7 @@ int EasySocket::receive(void *buf, size_t nbyte)
if(!checkSocket(m_replySocket)) return -1;
int res = 0;
#ifdef _WIN32
res = ::recv(m_replySocket, (char*)buf, nbyte, 0);
res = ::recv(m_replySocket, (char*)buf, (int)nbyte, 0);
#else
res = ::read(m_replySocket,buf,nbyte);
#endif
@ -203,19 +203,19 @@ int EasySocket::accept()
if(!checkSocket(m_socket)) return -1;
m_replySocket = ::accept(m_socket,nullptr,nullptr);
checkResult(m_replySocket);
checkResult((int)m_replySocket);
if(checkSocket(m_replySocket))
{
int send_buffer = 64*1024*1024;
int send_buffer_sizeof = sizeof(int);
setsockopt(m_replySocket, SOL_SOCKET, SO_SNDBUF, (char*)&send_buffer, send_buffer_sizeof);
//int flag = 1;
//int result = setsockopt(m_replySocket,IPPROTO_TCP,TCP_NODELAY,(char *)&flag,sizeof(int));
//setBlocking(m_replySocket,true);
}
return m_replySocket;
return (int)m_replySocket;
}
bool EasySocket::setAddress(const char *serv, uint16_t portno)