i2pd/SAM.h

41 lines
546 B
C
Raw Normal View History

2014-09-24 16:01:26 +00:00
#ifndef SAM_H__
#define SAM_H__
#include <thread>
#include <boost/asio.hpp>
namespace i2p
{
namespace stream
{
class SAMBridge
{
public:
SAMBridge (int port);
~SAMBridge ();
void Start ();
void Stop ();
private:
void Run ();
void Accept ();
void HandleAccept(const boost::system::error_code& ecode);
private:
bool m_IsRunning;
std::thread * m_Thread;
boost::asio::io_service m_Service;
boost::asio::ip::tcp::acceptor m_Acceptor;
boost::asio::ip::tcp::socket * m_NewSocket;
};
}
}
#endif