mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send tunnel participant data to transport session directly. Implemented TunnelTransportSender
This commit is contained in:
parent
3264704a23
commit
e76d09e1a1
9 changed files with 95 additions and 48 deletions
|
@ -454,13 +454,6 @@ namespace transport
|
|||
return {}; // invalid future
|
||||
}
|
||||
|
||||
std::future<std::shared_ptr<TransportSession> > Transports::SendMessages (const i2p::data::IdentHash& ident, std::list<std::shared_ptr<i2p::I2NPMessage> >& msgs)
|
||||
{
|
||||
std::list<std::shared_ptr<i2p::I2NPMessage> > msgs1;
|
||||
msgs.swap (msgs1);
|
||||
return SendMessages (ident, std::move (msgs1));
|
||||
}
|
||||
|
||||
std::future<std::shared_ptr<TransportSession> > Transports::SendMessages (const i2p::data::IdentHash& ident, std::list<std::shared_ptr<i2p::I2NPMessage> >&& msgs)
|
||||
{
|
||||
return boost::asio::post (*m_Service, boost::asio::use_future ([this, ident, msgs = std::move(msgs)] () mutable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue