[英]To transfer files to device using FTP, is it necessary to have a server running on it?
For some time now I've been trying to send files to a Embedded Linux device via FTP without success. 一段时间以来,我一直试图通过FTP将文件发送到嵌入式Linux设备,但没有成功。 I even previously put a question in SO talking about my problem, and I still haven't got any further in solving it.
我什至以前甚至在提一个问题时都在谈论我的问题,但是我仍然没有进一步解决它的方法。
One thing I noticed, though, is that most FTP examples in the web includes a server-client relationship; 我注意到的一件事是,网络上的大多数FTP示例都包含服务器与客户端的关系。 the client connects itself to the server that is constantly listening in some IP-Port and the file transfer begins.
客户端将其自身连接到不断监听某些IP端口的服务器,并且文件传输开始。 Now when studying the examples using QNetworkAcessManager to send a file (generally to HTTP), they never mentioned the "other side requirements", what is leading me to believe I'm missing the necessary FTP server running in my Embedded Linux device.
现在,在研究使用QNetworkAcessManager发送文件(通常发送到HTTP)的示例时,他们从未提到“其他要求”,这使我相信我缺少嵌入式Linux设备中运行的必需FTP服务器。
So my question is more like a confirmation of my suspicions: if I want to transfer a file from my Desktop to my device using FTP, do I need to have a FTP server constantly running on that device? 所以我的问题更像是对我的怀疑的确认:如果我想使用FTP将文件从桌面传输到设备,是否需要使FTP服务器在该设备上持续运行? If yes, how that should change my code?
如果是,那应该如何更改我的代码? For instance, should I abandon QNetworkAcessManager in favour of a QTcpClient usage?
例如,我应该放弃QNetworkAcessManager而是使用QTcpClient吗? IOW what else should I know to make the file transfer system work using Qt?
IOW,我还应该知道什么才能使文件传输系统使用Qt正常工作? (In fact should I even bother myself with FTP at all instead of just using a normal QTcpServer ?)
(实际上,我应该完全不关心 FTP而不仅仅是使用普通的QTcpServer吗?)
FTP is a protocol with 2 parties, the client and the server. FTP是一个由两个方(客户端和服务器)组成的协议。 Both must comply to the specification of FTP before file transfer can take place.
两者都必须符合FTP的规范,然后才能进行文件传输。
So yes there has to be a FTP deamon (the server) running the on the other device. 因此,是的,必须在另一台设备上运行FTP守护进程(服务器)。
It doesn't have to run constantly just whenever you want to transfer files. 它不必仅在您要传输文件时就一直运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.