我怎样才能在使用套接字互联网发送数据? [英] How can I send data over the internet using a socket?

查看:153
本文介绍了我怎样才能在使用套接字互联网发送数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过一个桌面应用程序通过互联网发送数据。我知道插座一点点。我已经传送的数据在局域网内,但现在我想在互联网上传输数据。什么是转大,小批量的数据的最佳方式?

I would like to send data over internet through a desktop application. I know a little bit about sockets. I have transferred the data within the LAN, but now I want to transfer the data over the internet. What is the best way to transfer both large and small quantities of data?

我的系统连接到具有接入互联网的服务器。我的系统的IP地址是动态的。我不知道如何将数据发送到被连接到互联网的其他系统。我需要找到路由器的地址? (我的IP地址作为192.168.1.15生成)。

My system is connected to the server which has the access to the internet. My system's IP address is dynamic. I don't know how to send the data to another system which is connected to the internet. Do I need to find the router address? (My IP address is generated as 192.168.1.15).

时使用的插座不够,或者HTTP要求?

Is using a socket enough, or is HTTP required?

推荐答案

Socket是不够的,如果没有防火墙/代理服务器参与。

Socket is enough if no firewalls/proxies are involved.

不过,随着互联网参与(不是最快的连接),我建议为方便你最好选择远程通过HTTP着想。这样一来,即使在将来设置的改变,和防火墙/代理服务器涉足方程式中,你不应该担心。

But, as Internet is involved (not the fastest connection), I suggest for the sake of convenience you should better opt for remoting over http. That way, even if in the future the setup changes, and firewalls/proxies get involved in the equation, you should not worry.

这篇关于我怎样才能在使用套接字互联网发送数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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