简体   繁体   English

C#套接字服务器和客户端

[英]c# socket server and client

Have anyone able to use visual studio socket server and client to work successfully over WAN network and not LAN?? 有没有人能够使用Visual Studio套接字服务器和客户端在WAN网络而非LAN上成功工作? I got it to work on LAN but not over the WAN. 我知道它可以在LAN上工作,但不能在WAN上工作。

By far the most common cause of problems when you go from LAN to WAN is firewall setup. 到目前为止,当您从LAN转到WAN时,最常见的问题原因是防火墙设置。 If the server process is behind a NAT firewall, then you will need to connect to the public IP address assigned to you by your ISP, but it won't work until you set up a pinhole in the firewall's configuration that directs incoming connections to the appropriate internal IP/port. 如果服务器进程位于NAT防火墙之后,则需要连接到ISP分配给您的公共IP地址 ,但是只有在防火墙的配置中设置了将进入的连接定向到防火墙的针孔后,该地址才能起作用。适当的内部IP /端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM