- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for shuffleByWeight (0.1 sec)
-
src/net/dnsclient.go
Weight uint16 } // byPriorityWeight sorts SRV records by ascending priority and weight. type byPriorityWeight []*SRV // shuffleByWeight shuffles SRV records by weight using the algorithm // described in RFC 2782. func (addrs byPriorityWeight) shuffleByWeight() { sum := 0 for _, addr := range addrs { sum += int(addr.Weight) } for sum > 0 && len(addrs) > 1 { s := 0 n := randIntn(sum)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 5.7K bytes - Viewed (0)