Skip to content

Commit

Permalink
async receive
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Mar 26, 2014
1 parent 06b2500 commit bd768b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion HTTPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down
2 changes: 1 addition & 1 deletion Streaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit bd768b9

Please sign in to comment.