Added class RecvBuf.

This commit is contained in:
XMRig 2019-03-15 03:44:02 +07:00
parent 9808fbe396
commit f5077cadbd
6 changed files with 203 additions and 73 deletions

View file

@ -135,7 +135,8 @@ void xmrig::Client::Tls::read(const char *data, size_t size)
int bytes_read = 0;
while ((bytes_read = SSL_read(m_ssl, m_buf, sizeof(m_buf))) > 0) {
m_client->parse(m_buf, bytes_read);
m_buf[bytes_read - 1] = '\0';
m_client->parse(m_buf, static_cast<size_t>(bytes_read));
}
}