C# 端口转发
我正在开发一个简单的 p2p 程序,该程序旨在通过互联网工作,这在 LAN 上运行良好,但是当涉及路由器和互联网连接时,任何东西都无法到达机器。我知道这是一个网络问题,而不是 C# 问题,但我不能让该程序的用户每次想要使用该软件时都设置端口转发。我读过有关此问题的其他帖子,但大多数看起来都很旧,所以我想知道 VS2010 是否有任何方法来解决这个问题。
注意:网络代码已经完成,并且使用 TCPLsteners 和客户端,所以我无法切换到任何其他方法...
谢谢,
PM
I'm developing a simple p2p program that is meant to work over the Internet, this works fine on a LAN, but when a router and internet connection are involved nothing gets to the machine. I am aware that this is a network question more than a C# question, but I can't have users of this program set up port forwarding every time they want to use the software. I have read the other posts regarding this, but most seem old, so I was wondering if VS2010 has any way to tackle this.
Note: The code for the networking is already complete, and uses TCPLsteners and Clients, so I can't switch to any other method...
Thanks,
PM
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是否有适用于 .NET 的 UPnP 库(C#或 VB.NET)? 看起来很有希望...
Is there a UPnP Library for .NET (C# or VB.NET)? looks promising...