public void Should_be_able_to_close_connection()
        {
            // first get a connection
            var connections = managementClient.GetConnections();

            // then close it
            managementClient.CloseConnection(connections.First());
        }
Esempio n. 2
0
 public void OccasionallyKillConnections(IManagementClient client)
 {
     while (true)
     {
         Thread.Sleep(3000);
         var connections = client.GetConnections();
         foreach (var connection in connections)
         {
             Console.Out.WriteLine("\nKilling connection: {0}\n", connection.Name);
             client.CloseConnection(connection);
         }
     }
 }