mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Create I2Pservice as a way to integrate service management, hide unnecessary handlers
This commit is contained in:
parent
88560d06a1
commit
dd42819a2f
13 changed files with 321 additions and 327 deletions
8
BOB.cpp
8
BOB.cpp
|
@ -28,7 +28,7 @@ namespace client
|
|||
void BOBI2PInboundTunnel::Stop ()
|
||||
{
|
||||
m_Acceptor.close();
|
||||
ClearConnections ();
|
||||
ClearHandlers ();
|
||||
}
|
||||
|
||||
void BOBI2PInboundTunnel::Accept ()
|
||||
|
@ -136,7 +136,7 @@ namespace client
|
|||
{
|
||||
LogPrint ("New BOB inbound connection");
|
||||
auto connection = std::make_shared<I2PTunnelConnection>(this, receiver->socket, leaseSet);
|
||||
AddConnection (connection);
|
||||
AddHandler (connection);
|
||||
connection->I2PConnect (receiver->data, receiver->dataLen);
|
||||
delete receiver;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ namespace client
|
|||
|
||||
void BOBI2POutboundTunnel::Stop ()
|
||||
{
|
||||
ClearConnections ();
|
||||
ClearHandlers ();
|
||||
}
|
||||
|
||||
void BOBI2POutboundTunnel::Accept ()
|
||||
|
@ -171,7 +171,7 @@ namespace client
|
|||
if (stream)
|
||||
{
|
||||
auto conn = std::make_shared<I2PTunnelConnection> (this, stream, new boost::asio::ip::tcp::socket (GetService ()), m_Endpoint, m_IsQuiet);
|
||||
AddConnection (conn);
|
||||
AddHandler (conn);
|
||||
conn->Connect ();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue