System.Net.Sockets.TcpClient.ConnectAsyncCore C# (CSharp) Method

ConnectAsyncCore() private method

private ConnectAsyncCore ( string host, int port ) : System.Threading.Tasks.Task
host string
port int
return System.Threading.Tasks.Task
        private Task ConnectAsyncCore(string host, int port)
        {
            return Task.Factory.FromAsync(
                (targetHost, targetPort, callback, state) => ((TcpClient)state).BeginConnect(targetHost, targetPort, callback, state),
                asyncResult => ((TcpClient)asyncResult.AsyncState).EndConnect(asyncResult),
                host,
                port,
                state: this);
        }

Same methods

TcpClient::ConnectAsyncCore ( IPAddress address, int port ) : System.Threading.Tasks.Task