I am making a small ftp client to get some large files from ftp. I read in the RFC that the ABOR command is very problematic for servers. Almost all the servers that I see continue to send data even after ABOR is sent through a control connection. Closing the data transfer may lead (in 70% of the tests) to closing the control connection. The server simply sends the FIN packet after I clicked on the ABOR packet. What is the best good way to stop receiving on some byte and not lose control connection? FlashFXP does this fine for all types of delays and servers. When examining tcp traffic, I found a standard ftp rfc stream.
But in my case, it still fails to interrupt the transmission using this technique:
1) shutdown (passive_socket, SD_BOTH)
2) closesocket (passive_socket);
3) send (control_socket, "ABOR \ r \ n")
4) recv (control_socket) - stopped here
thank
source
share