Home Forums Support Loop through connected clients.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1283
    Anonymous
    Inactive

    How can I loop through each connected clients to check if they are alive?

    #1284
    Anonymous
    Inactive

    Heya Mussie,

    Thanks for your interest in our library and welcome to our forums.

    How can I loop through each connected clients to check if they are alive?

    //Loop over every connection and check the alive state
    foreach (Connection conn in NetworkComms.GetExistingConnection())
    {
        //If true the remote end of the connection responded to an alive/ping test
        if (conn.ConnectionAlive())
            Console.WriteLine("Connection with {0} is alive", conn.ToString());
        else
            Console.WriteLine("Connection with {0} is dead", conn.ToString());
    }

    Kind regards,
    Marc

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.