build
fun build(encryption: Boolean = false, seed: Boolean = false, utp: Boolean = false, holepunch: Boolean = false): Int
Assemble the per-peer flags byte the way ut_pex_plugin::tick does:
pex_flags_t flags = p->is_seed() ? pex_seed : pex_flags_t{};
flags |= p->supports_encryption() ? pex_encryption : pex_flags_t{};
flags |= is_utp(p->get_socket()) ? pex_utp : pex_flags_t{};
flags |= p->supports_holepunch() ? pex_holepunch : pex_flags_t{};Content copied to clipboard
uTP and hole-punch are positive-only signals. A cleared bit means "unknown", not "unsupported". The result is 0..0x0F; the internal LT_V2 bit is never set by this builder (it is local-only state).