forked from I2P_Developers/i2p.i2p
comment re: SSU timestamps
This commit is contained in:
@@ -1474,6 +1474,7 @@ class PacketBuilder {
|
||||
flagByte |= UDPPacket.HEADER_FLAG_EXTENDED_OPTIONS;
|
||||
data[off] = flagByte;
|
||||
off++;
|
||||
// Note, this is unsigned, so we're good until February 2106
|
||||
long now = (_context.clock().now() + 500) / 1000;
|
||||
DataHelper.toLong(data, off, 4, now);
|
||||
// todo: add support for rekeying
|
||||
|
||||
@@ -84,6 +84,7 @@ class UDPPacketReader {
|
||||
|
||||
/** @return seconds */
|
||||
public long readTimestamp() {
|
||||
// Note, this is unsigned, so we're good until February 2106
|
||||
return DataHelper.fromLong(_message, _payloadBeginOffset + 1, 4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user