mirror of https://github.com/PurpleI2P/i2pd
I2PControl added
parent
88560d06a1
commit
cdc0aa658a
@ -0,0 +1,15 @@
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
#include "I2PControl.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace client
|
||||
{
|
||||
I2PControlService::I2PControlService (int port):
|
||||
m_IsRunning (false), m_Thread (nullptr),
|
||||
m_Acceptor (m_Service, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
#ifndef I2P_CONTROL_H__
|
||||
#define I2P_CONTROL_H__
|
||||
|
||||
#include <thread>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace client
|
||||
{
|
||||
class I2PControlService
|
||||
{
|
||||
public:
|
||||
|
||||
I2PControlService (int port);
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsRunning;
|
||||
std::thread * m_Thread;
|
||||
|
||||
boost::asio::io_service m_Service;
|
||||
boost::asio::ip::tcp::acceptor m_Acceptor;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue