System.Net.FtpWebRequest.CreateConnectionAsync C# (CSharp) Method

CreateConnectionAsync() private method

private CreateConnectionAsync ( ) : void
return void
        private async void CreateConnectionAsync()
        {
            string hostname = _uri.Host;
            int port = _uri.Port;

            TcpClient client = new TcpClient();

            object result;
            try
            {
                await client.ConnectAsync(hostname, port).ConfigureAwait(false);
                result = new FtpControlStream(client);
            }
            catch (Exception e)
            {
                result = TranslateConnectException(e);
            }

            AsyncRequestCallback(result);
        }