Browse Source

async receive

pull/48/head
orignal 11 years ago
parent
commit
bd768b9259
  1. 3
      HTTPServer.cpp
  2. 3
      HTTPServer.h
  3. 2
      Streaming.h

3
HTTPServer.cpp

@ -277,6 +277,9 @@ namespace util @@ -277,6 +277,9 @@ namespace util
}
}
void HTTPConnection::HandleStreamReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred)
{
}
HTTPServer::HTTPServer (int port):
m_Thread (nullptr), m_Work (m_Service),

3
HTTPServer.h

@ -44,7 +44,8 @@ namespace util @@ -44,7 +44,8 @@ namespace util
void Terminate ();
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 HandleRequest ();

2
Streaming.h

@ -201,7 +201,7 @@ namespace stream @@ -201,7 +201,7 @@ namespace stream
void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int 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));
}

Loading…
Cancel
Save