mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
async receive
This commit is contained in:
parent
06b2500347
commit
bd768b9259
@ -277,6 +277,9 @@ namespace util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HTTPConnection::HandleStreamReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
HTTPServer::HTTPServer (int port):
|
HTTPServer::HTTPServer (int port):
|
||||||
m_Thread (nullptr), m_Work (m_Service),
|
m_Thread (nullptr), m_Work (m_Service),
|
||||||
|
@ -44,7 +44,8 @@ namespace util
|
|||||||
|
|
||||||
void Terminate ();
|
void Terminate ();
|
||||||
void Receive ();
|
void Receive ();
|
||||||
void HandleReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred);
|
void HandleReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred);
|
||||||
|
void HandleStreamReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred);
|
||||||
void HandleWrite(const boost::system::error_code& ecode);
|
void HandleWrite(const boost::system::error_code& ecode);
|
||||||
|
|
||||||
void HandleRequest ();
|
void HandleRequest ();
|
||||||
|
@ -201,7 +201,7 @@ namespace stream
|
|||||||
void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout)
|
void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout)
|
||||||
{
|
{
|
||||||
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
||||||
m_ReceiveTimer.async_wait (boost::bind (&Stream::HandleReceiveTimer,
|
m_ReceiveTimer.async_wait (boost::bind (&Stream::HandleReceiveTimer<Buffer, ReceiveHandler>,
|
||||||
this, boost::asio::placeholders::error, buffer, handler));
|
this, boost::asio::placeholders::error, buffer, handler));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user