use unique_ptr for socket in I2PTunnelConnection

pull/165/head
orignal 9 years ago
parent 77fd296095
commit 02de91f7f2

@ -33,7 +33,6 @@ namespace client
I2PTunnelConnection::~I2PTunnelConnection ()
{
delete m_Socket;
}
void I2PTunnelConnection::I2PConnect (const uint8_t * msg, size_t len)

@ -49,7 +49,7 @@ namespace client
private:
uint8_t m_Buffer[I2P_TUNNEL_CONNECTION_BUFFER_SIZE], m_StreamBuffer[I2P_TUNNEL_CONNECTION_BUFFER_SIZE];
boost::asio::ip::tcp::socket * m_Socket;
std::unique_ptr<boost::asio::ip::tcp::socket> m_Socket;
std::shared_ptr<i2p::stream::Stream> m_Stream;
boost::asio::ip::tcp::endpoint m_RemoteEndpoint;
bool m_IsQuiet; // don't send destination

Loading…
Cancel
Save