Browse Source

use unique_ptr for socket in I2PTunnelConnection

pull/165/head
orignal 10 years ago
parent
commit
02de91f7f2
  1. 1
      I2PTunnel.cpp
  2. 2
      I2PTunnel.h

1
I2PTunnel.cpp

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

2
I2PTunnel.h

@ -49,7 +49,7 @@ namespace client @@ -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