NAT Traversal using only free STUN and TURN servers in C#

前提是你 提交于 2019-12-07 20:54:23

问题


I am trying to make an online game application, which communicates with another pc peer-to-peer over the Internet. Since both pc's are likely to be under NAT, and since I cannot afford an external server, I thought the only way is to use free STUN and TURN server, such as Numb.

However, after some research, I couldn't figure out how to use those servers to make a connection.

Is it really possible to use only those servers to do it? If it is, how would you do that? Or is there an easier way of doing that?

I can use either UDP or TCP for this.


回答1:


Take a look at the Internet Gateway Device Protocol. Is is an extension to the UPNP protocol, is very easy to use, is supported by pretty much every router out there and there are some free libs implementing this protocol.



来源:https://stackoverflow.com/questions/23456570/nat-traversal-using-only-free-stun-and-turn-servers-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!