create io_service together with destination

This commit is contained in:
orignal 2014-12-15 22:50:11 -05:00
parent f357a5864c
commit e3f077ee9a
4 changed files with 27 additions and 73 deletions

View file

@ -36,12 +36,8 @@ namespace datagram
else
m_Owner.Sign (buf1, len, signature);
auto service = m_Owner.GetService ();
if (service)
service->post (std::bind (&DatagramDestination::SendMsg, this,
CreateDataMessage (buf, len + headerLen), remote));
else
LogPrint (eLogWarning, "Failed to send datagram. Destination is not running");
m_Owner.GetService ().post (std::bind (&DatagramDestination::SendMsg, this,
CreateDataMessage (buf, len + headerLen), remote));
}
void DatagramDestination::SendMsg (I2NPMessage * msg, const i2p::data::LeaseSet& remote)