This commit is contained in:
hhd
2021-11-24 22:40:07 +08:00
commit 954dfba4e0
47 changed files with 3625 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package main
import (
"sync"
)
var p2pAppKeys sync.Map
func GetKey(appID uint64) uint64 {
i, ok := p2pAppKeys.Load(appID)
if !ok {
return 0
}
return i.(uint64)
}
func SaveKey(appID uint64, appKey uint64) {
p2pAppKeys.Store(appID, appKey)
}