Browse Source

use 'available' method

pull/158/head
orignal 10 years ago
parent
commit
7dd159add2
  1. 4
      NTCPSession.cpp

4
NTCPSession.cpp

@ -509,9 +509,7 @@ namespace transport @@ -509,9 +509,7 @@ namespace transport
// try to read more
if (numReloads < 5)
{
boost::asio::socket_base::bytes_readable command (true);
m_Socket.io_control (command);
size_t moreBytes = command.get();
size_t moreBytes = m_Socket.available();
if (moreBytes)
{
if (moreBytes > NTCP_BUFFER_SIZE - m_ReceiveBufferOffset)

Loading…
Cancel
Save