code_junkie

FTP client class for .NET

Nov 10th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. // initialize FTP client
  2. Ftp client = new Ftp();
  3.  
  4. // setup proxy details
  5. client.Proxy.ProxyType = FtpProxyType.HttpConnect;
  6. client.Proxy.Host = proxyHostname;
  7. client.Proxy.Port = proxyPort;
  8.  
  9. // add proxy username and password when needed
  10. client.Proxy.UserName = proxyUsername;
  11. client.Proxy.Password = proxyPassword;
  12.  
  13. // connect, login
  14. client.Connect(hostname, port);
  15. client.Login(username, password);
  16.  
  17. // do some work
  18. // ...
  19.  
  20. // disconnect
  21. client.Disconnect();
Add Comment
Please, Sign In to add comment