RankSNIs keeps only OK outcomes and sorts by handshake time ascending.
(in []Result)
| 91 | |
| 92 | // RankSNIs keeps only OK outcomes and sorts by handshake time ascending. |
| 93 | func RankSNIs(in []Result) []Result { |
| 94 | out := make([]Result, 0, len(in)) |
| 95 | for _, r := range in { |
| 96 | if r.Outcome == OutcomeOK { |
| 97 | out = append(out, r) |
| 98 | } |
| 99 | } |
| 100 | sort.Slice(out, func(i, j int) bool { return out[i].Handshake < out[j].Handshake }) |
| 101 | return out |
| 102 | } |
no outgoing calls