Fix import statements and improve error handling in examples

This commit is contained in:
yashksaini-coder
2025-09-18 02:22:31 +05:30
parent 4dd2454a46
commit bf132cf3dd
5 changed files with 9 additions and 5 deletions

View File

@ -30,6 +30,7 @@ async def main():
for addr in listen_addrs:
addr_str = str(addr).replace("/tcp/", "/udp/") + "/quic-v1"
from multiaddr import Multiaddr
quic_addrs.append(Multiaddr(addr_str))
optimal_addr = get_optimal_binding_address(port, protocol="udp")