C#套接字无法从Internet连接到计算机 [英] C# socket Can not connect to the computer from the Internet

查看:139
本文介绍了C#套接字无法从Internet连接到计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当计算机没有直接通过局域网卡连接Internet时,无法使用套接字从Internet连接到计算机。该怎么办?如果我有一台计算机podklyuchayus Katori互联网连接直接一切都很好,转向TP-LINK的adaprami不起作用。

Can not connect to the computer from the Internet by using socket, when the computer has Internet connected not directly through a lan card. What to do? If I have a computer podklyuchayus Katori Internet connection directly everything is fine and turns with adaprami of TP-LINK does not work.

推荐答案

这很难给解决方案,但不知道您的确切网络设置。

通过路由器连接时最常见的情况是您的本地网络位于NAT后面,并且无法从Internet连接到本地计算机。

解决方案取决于您的路由器功能:您希望搜索端口转发或将您的计算机放入DMZ区域。
It''s hard to give a solution without knowing your exact network setup.
Most common case when connecting through a router is that your local network is behind NAT and it makes direct connection from Internet to local computer impossible.
Solution depends on your router capabilities: you would want to search for port forwarding or put your computer in DMZ zone.


我只想使用套接字连接到远程计算机并发送消息(TCP聊天)。你有什么建议?端口转发或将计算机放入DMZ区域?
I just want to use socket to connect to a remote computer and send the message (TCP chat). What do you suggest? Port forwarding or put the computer in DMZ zone?


这篇关于C#套接字无法从Internet连接到计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆