| 140 | |
| 141 | |
| 142 | void NetPeer::BeginRead() |
| 143 | { |
| 144 | boost::asio::streambuf::mutable_buffers_type mutableBuffer = m_readstream.prepare(NETWORK_MAX_ALLOWED_SIZE); |
| 145 | boost::asio::async_read(m_socket, mutableBuffer, boost::asio::transfer_at_least(1), boost::bind(&NetPeer::HandleRead, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); |
| 146 | } |
| 147 | |
| 148 | void NetPeer::HandleRead(std::weak_ptr <NetPeer> self, const boost::system::error_code & e, std::size_t ulSuccessedByteCount) |
| 149 | { |