Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FtpHandle"/> class with the specified parameters. Normally, <see cref="InternetOpenHandle.Connect"/> or <see cref="O:Nito.KitchenSink.WinInet.InternetOpenHandle.ConnectFtp"/> is used instead of this constructor.
 /// </summary>
 /// <param name="parent">The parent internet connection.</param>
 /// <param name="serverName">Name of the server to which to connect.</param>
 /// <param name="serverPort">The server port to which to connect.</param>
 /// <param name="username">The username to use for authentication.</param>
 /// <param name="password">The password to use for authentication.</param>
 /// <param name="flags">The connection flags, such as <see cref="InternetConnectHandle.Flags.Passive"/> for passive FTP.</param>
 public FtpHandle(InternetHandle parent, string serverName, int serverPort, string username, string password, InternetConnectHandle.Flags flags)
     : base(parent, serverName, serverPort, username, password, Service.Ftp, flags)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InternetConnectHandle"/> class with the specified parameters. Normally, <see cref="InternetOpenHandle.Connect"/> is used instead of this constructor.
 /// </summary>
 /// <param name="parent">The parent opened internet connection.</param>
 /// <param name="serverName">Name of the server to which to connect.</param>
 /// <param name="serverPort">The server port to which to connect.</param>
 /// <param name="username">The username to use for authentication.</param>
 /// <param name="password">The password to use for authentication.</param>
 /// <param name="service">The service type to which to connect.</param>
 /// <param name="flags">The connection flags.</param>
 public InternetConnectHandle(InternetHandle parent, string serverName, int serverPort, string username, string password, Service service, Flags flags)
     : base(UnsafeNativeMethods.InternetConnect(parent.SafeInternetHandle, serverName, (ushort)(short) serverPort, username, password, service, flags))
 {
 }