PowerTCP FTP for .NET
ProxyType Enumeration
Example Example 



Enumerates the proxy support provided by this product.
Syntax
Public Enum ProxyType 
   Inherits System.Enum
Dim instance As ProxyType
public enum ProxyType : System.Enum 
public enum class ProxyType : public System.Enum 
Members
MemberDescription
Http An HTTP server proxy is to be used.
None No server proxy is to be used.
Open The "OPEN" command is used to connect to an FTP server through this FTP server proxy.
Site The "SITE" command is used to connect to an FTP server through this FTP server proxy.
Socks4 A SOCKS4 server proxy is to be used.
Socks5 A SOCKS5 server proxy is to be used.
User The "USER" command is used to connect to an FTP server through this FTP server proxy.
Example
This example demonstrates using the FTP control to connect to an FTP site using Explicit security.
private void connectExplicit()
{
    //Set the proxy type and details
    ftp1.Session.Proxy.Type = ProxyType.User;
    ftp1.Session.Proxy.RemoteEndPoint = new IPEndPoint(myProxyServer, 21);
    ftp1.Session.Proxy.Username = myProxyUsername;
    ftp1.Session.Proxy.Password = myProxyPassword;

    //Connect to 'myServer' through the proxy.
    ftp1.Connect(myServer);

    //Authenticate the user.
    ftp1.Authenticate(myUsername, myPassword);

    //Perform user operations here, such as get a file listing.
    Listing Files = ftp1.List("", "", ListType.Full);

    //Close the connection.
    ftp1.Close();
}
Private Sub connectExplicit()
    'Set the proxy type and details
    ftp1.Session.Proxy.Type = ProxyType.User
    ftp1.Session.Proxy.RemoteEndPoint = New IPEndPoint(myProxyServer, 21)
    ftp1.Session.Proxy.Username = myProxyUsername
    ftp1.Session.Proxy.Password = myProxyPassword

    'Connect to 'myServer' through the proxy.
    ftp1.Connect(myServer)

    'Authenticate the user.
    ftp1.Authenticate(myUsername, myPassword)

    'Perform user operations here, such as get a file listing.
    Dim Files As Listing = ftp1.List("", "", ListType.Full)

    'Close the connection.
    ftp1.Close()
End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Dart.Ftp.ProxyType

See Also

Reference

Dart.Ftp Namespace


PowerTCP FTP for .NET Documentation Version 4.7
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic