mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 09:56:35 +02:00
send SSU DeliveryStatus
This commit is contained in:
parent
53230a4051
commit
b9031c331d
3 changed files with 13 additions and 4 deletions
|
@ -70,8 +70,17 @@ namespace i2p
|
|||
I2NPMessage * CreateDeliveryStatusMsg (uint32_t msgID)
|
||||
{
|
||||
I2NPDeliveryStatusMsg msg;
|
||||
if (msgID)
|
||||
{
|
||||
msg.msgID = htobe32 (msgID);
|
||||
msg.timestamp = htobe64 (i2p::util::GetMillisecondsSinceEpoch ());
|
||||
}
|
||||
else // for SSU establishment
|
||||
{
|
||||
auto rnd = i2p::context.GetRandomNumberGenerator ();
|
||||
msg.msgID = htobe32 (rnd.GenerateWord32 ());
|
||||
msg.timestamp = htobe64 (2); // netID = 2
|
||||
}
|
||||
return CreateI2NPMessage (eI2NPDeliveryStatus, (uint8_t *)&msg, sizeof (msg));
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ namespace data
|
|||
// caps
|
||||
WriteString ("caps", properties);
|
||||
properties << '=';
|
||||
WriteString ("BC", properties); // TODO:
|
||||
WriteString ("B", properties); // TODO: should be 'BC' for introducers
|
||||
properties << ';';
|
||||
}
|
||||
else
|
||||
|
|
2
SSU.cpp
2
SSU.cpp
|
@ -176,7 +176,7 @@ namespace ssu
|
|||
m_State = eSessionStateConfirmedReceived;
|
||||
LogPrint ("Session confirmed received");
|
||||
m_State = eSessionStateEstablished;
|
||||
// TODO: send DeliverStatus
|
||||
SendI2NPMessage (CreateDeliveryStatusMsg (0));
|
||||
Established ();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue