by josh [josh dot coffman at americawest dot com] posted on 2005/08/04 |
|
Based on the FTPClient example. I was able to implement my own client, but haven't been able to get much further than login. I am trying to get a file listing from the FTP/SSL server, but haven't been able to work out a way to get the data back via a dataconnection. I am using PASV to get the endpoint; then I create a new connection on those and send "LIST" on the main connection. Reading Receive() gets nothing, and socket.Available is always = 0. An example would be great. A push in the right direction would be much appreciated also.
Thanks,
j |
by Fred posted on 2005/08/31 |
|
I normally do a receive first on the data socket and then compare the amount received against the buffer size. If those two don't match then I check the available amount. If its 0 then I exit out, otherwise continue looping the receive... sometimes theres lag and it cant fill a buffer.
Also, check your response code after you call for the data... sometimes the server isn't sending it and telling you why with an error code. |