+
+ outstandingHolepunchingRendezvous map[netip.AddrPort]struct{}
+}
+
+func (cn *PeerConn) pexStatus() string {
+ if !cn.bitExtensionEnabled(pp.ExtensionBitLtep) {
+ return "extended protocol disabled"
+ }
+ if cn.PeerExtensionIDs == nil {
+ return "pending extended handshake"
+ }
+ if !cn.supportsExtension(pp.ExtensionNamePex) {
+ return "unsupported"
+ }
+ if true {
+ return fmt.Sprintf(
+ "%v conns, %v unsent events",
+ len(cn.pex.remoteLiveConns),
+ cn.pex.numPending(),
+ )
+ } else {
+ // This alternative branch prints out the remote live conn addresses.
+ return fmt.Sprintf(
+ "%v conns, %v unsent events",
+ strings.Join(generics.SliceMap(
+ maps.Keys(cn.pex.remoteLiveConns),
+ func(from netip.AddrPort) string {
+ return from.String()
+ }), ","),
+ cn.pex.numPending(),
+ )
+ }