|
|
|
@ -836,7 +836,12 @@ namespace transport
@@ -836,7 +836,12 @@ namespace transport
|
|
|
|
|
void SSUSession::PostI2NPMessage (I2NPMessage * msg) |
|
|
|
|
{ |
|
|
|
|
if (msg) |
|
|
|
|
{ |
|
|
|
|
if (m_State == eSessionStateEstablished) |
|
|
|
|
m_Data.Send (msg); |
|
|
|
|
else |
|
|
|
|
DeleteI2NPMessage (msg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SSUSession::SendI2NPMessages (const std::vector<I2NPMessage *>& msgs) |
|
|
|
@ -845,10 +850,18 @@ namespace transport
@@ -845,10 +850,18 @@ namespace transport
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SSUSession::PostI2NPMessages (std::vector<I2NPMessage *> msgs) |
|
|
|
|
{ |
|
|
|
|
if (m_State == eSessionStateEstablished) |
|
|
|
|
{ |
|
|
|
|
for (auto it: msgs) |
|
|
|
|
if (it) m_Data.Send (it); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
for (auto it: msgs) |
|
|
|
|
DeleteI2NPMessage (it); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SSUSession::ProcessData (uint8_t * buf, size_t len) |
|
|
|
|
{ |
|
|
|
|