Exemple #1
0
//Generate new nonce for udpAddr and add to nonceMap
func generateNewNonce(udpAddr *net.UDPAddr, nonceMap clientServerUtils.ConcurrentMap) int64 {
	nonce := rand.Int63()
	nonceMap.Lock()
	nonceMap.Map[udpAddr.String()] = nonce
	nonceMap.Unlock()
	return nonce
}