support andoird

This commit is contained in:
hhd
2022-11-03 11:07:32 +08:00
parent 2af77668fe
commit af82fc6e36
90 changed files with 1674 additions and 334 deletions
+19
View File
@@ -0,0 +1,19 @@
package openp2p
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)
}