浏览代码

timestamp in protocol

v2ray 9 年之前
父节点
当前提交
9e68c150e1
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      common/protocol/time.go

+ 11 - 0
common/protocol/time.go

@@ -0,0 +1,11 @@
+package protocol
+
+import (
+	"github.com/v2ray/v2ray-core/common/serial"
+)
+
+type Timestamp int64
+
+func (this Timestamp) Bytes() []byte {
+	return serial.Int64Literal(this).Bytes()
+}