如何使用公共IP在c#中使用socket? [英] How to use socket in c# using public IP?

查看:132
本文介绍了如何使用公共IP在c#中使用socket?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做ac#项目,可以使用socket发送文件,当我在同一个网络中使用它时工作正常。但是,当在不同的网络上使用时,我使用公共IP,客户端套接字可以' t连接到服务器插座。



请帮助我!谢谢

I'm doing a c# project that can send a file using socket, it works fine when i'm using it in the same network.But, when used on different network then I used public ip, the client socket can't connect to server socket.

Please Help me! Thanks

推荐答案

您将不得不了解TCP / IP如何工作以及您与客户之间的路由器如何工作。



这不是一个你要在几个论坛帖子中得到解释的话题。有太多的信息可以过去。
You're going to have to learn how TCP/IP works and how any routers between you and the client work.

This is not a topic you're going to get an explanation about in a couple of forum posts. There's just way too much information to go over.


这篇关于如何使用公共IP在c#中使用socket?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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