ftp - FTP 服务器什么时候应该发送 226?

标签 ftp ftp-server

我正在 Qt 中创建一个 FTP 服务器,但我不确定何时发送 RETR 命令的 226 成功响应代码。

是否在所有数据写入之后、数据连接套接字关闭之前发送:

    reply(226);
    dataSocket()->disconnectFromHost();

或者我在数据连接套接字关闭后发送它:

    dataSocket()->disconnectFromHost();
    dataSocket()->waitForDisconnected();
    reply(226);

最佳答案

http://www.ietf.org/rfc/rfc959.txt

To prevent a race condition here, the server sends a reply (226) after closing the data connection.

关于ftp - FTP 服务器什么时候应该发送 226?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13785584/

相关文章:

c - 用 C 实现 FTP 服务器/客户端

ftp - FTP 错误(503 错误的命令序列)是客户端问题还是服务器问题的结果

用于 Web 部署的 Git 与 FTP

azure - Windows Azure 虚拟机上的被动 FTP

azure - Azure ARM 中负载均衡器的入站 NAT 规则,如何指定端口范围?

php - PHP 中的默认 FTP 用户名、密码

java - Spring Integration FtpOutboundGateway setLocalDirectory 与系统属性和#remoteDirectory

java - 将文件从 DCM4CHEE 移动到 FTP 服务器

c - 如何通过套接字发送/接收二进制数据?

android - 如何在不在 android 中下载的情况下从 ftpserver 播放媒体?