TcpClient.ConnectCallback C# (CSharp) Method

ConnectCallback() static private method

static private ConnectCallback ( IAsyncResult ar ) : void
ar IAsyncResult
return void
    static void ConnectCallback(IAsyncResult ar)
    {
        TcpClient self = (TcpClient)ar.AsyncState;
        if (self.sock.Connected)
            self.sock.EndConnect(ar);
        self.Connected.Invoke(self, self.sock);
    }