+
+ NumPeersUndialableWithoutHolepunch int
+ // Number of unique peer addresses that were dialed after receiving a holepunch connect message,
+ // that have previously been undialable without any hole-punching attempts.
+ NumPeersUndialableWithoutHolepunchDialedAfterHolepunchConnect int
+ // Number of unique peer addresses that were successfully dialed and connected after a holepunch
+ // connect message and previously failing to connect without holepunching.
+ NumPeersDialableOnlyAfterHolepunch int
+ NumPeersDialedSuccessfullyAfterHolepunchConnect int
+ NumPeersProbablyOnlyConnectedDueToHolepunch int
+}
+
+func (cl *Client) statsLocked() (stats ClientStats) {
+ stats.ConnStats = cl.connStats.Copy()
+ stats.ActiveHalfOpenAttempts = cl.numHalfOpen
+
+ stats.NumPeersUndialableWithoutHolepunch = len(cl.undialableWithoutHolepunch)
+ stats.NumPeersUndialableWithoutHolepunchDialedAfterHolepunchConnect = len(cl.undialableWithoutHolepunchDialedAfterHolepunchConnect)
+ stats.NumPeersDialableOnlyAfterHolepunch = len(cl.dialableOnlyAfterHolepunch)
+ stats.NumPeersDialedSuccessfullyAfterHolepunchConnect = len(cl.dialedSuccessfullyAfterHolepunchConnect)
+ stats.NumPeersProbablyOnlyConnectedDueToHolepunch = len(cl.probablyOnlyConnectedDueToHolepunch)
+
+ return