> Today I faced with strange behavior in my simple FTP program: if I 
> perform dir listing adn then try to get a file, RETR is sent and 
> then 15 sec timeout and error 550. When I download file without dir 
> listing, all is OK.
> Digged to the code and wasted some time, I understood that after 
> Socket.Close all its properties are returned to defaults, also 
> including Socks server properties! So when I connect DataSocket 2nd 
> time it doesn''t have any idea that it must use Socks. Am I 
> supposed to reconnect to server for each operation, or to set Socks 
> properties again and again for every file download?

It does seem that SOCKS has not been used by anyone in the eight years
since that code was originally added, since as you say the data socket
properties are set only once, and lost when it's closed.  

If you want a quick solution, you'll need to reset the SOCKS properties
before each DIR, GET or PUT (and similar commands), but even that may
fail since the code tries to set the control and data sockets at the same
time, and the control socket will already be open. 

> As I see, solution is to reassign fields in 
> TCustomFtpCli.DataSocketGetInit, 

Something like that, I'll try and look at this at the end of next week,
although it would be nice to have a way of testing it, I don't have a
SOCKS proxy. 

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to