comment re: SSU timestamps

This commit is contained in:
zzz
2015-11-18 20:04:45 +00:00
parent 1e89fac192
commit 599989deba
2 changed files with 2 additions and 0 deletions

View File

@@ -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

View File

@@ -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);
}