Are there any open source cross platform NAT punch throughs?

前端 未结 3 1321
萌比男神i
萌比男神i 2021-02-04 18:07

Are there any open source cross platform NAT punch throughs?

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 18:41

    The best I've seen is UDT, which is a reliable UDP library that also includes a "rendezvous" connect mode that helps take care of the NAT punching. All you have to do is figure out the external IP address and port and somehow get it to the other client (and vice versa). Once you know that information, you both connect and bind at the same time (with rendezvous mode set) and it'll do its best to figure out the rest.

提交回复
热议问题