How to configure Arduino Web Server to accept only one client

Hi everyone.

I have a simple Arduino webserver, and a client written in C#, how can i a configure my webserver to accept only one client( if it has a client connected disable the other incomming connection )
Now, if i have a client connected, the server dosen't communicate with other clients but those others clients can connect to server.

void loop()
{
    EthernetClient client = server.available();  // try to get client
if(gotClient == false && client == true) 
{
    if (client) {  // got client?
       gotClient = true;
            while (client.connected()) {
                if (client.available()) {   // client data available to read
                    char c = client.read(); // read 1 byte (character) from client
                    // last line of client request is blank and ends with \n
                Serial.println(c);
                client.print("szia");
                if( c == 'e' )
                {
                  client.stop();
                  gotClient = false;
                  delay(1);
                }
        } // end if (client)
    }
    }
}
}
  try
            {
                _clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                _clientSocket.Connect(IPAddress.Parse("xxx.xxx.xx.xxx"), xxxx);

                while (true)
                {
                    Console.Write("Enter text to send: ");
                    byte[] input = Encoding.ASCII.GetBytes(Console.ReadLine());
                    byte[] input2 = new byte[10];
             // //      if (input == "exit")
             //       {
              //         _clientSocket.Close();
           //             Environment.Exit(0);
            //       }

              //      _clientSocket.Send(Encoding.ASCII.GetBytes(input));
                    _clientSocket.Send(input);
                    //Console.Clear();
                    _clientSocket.Receive(input2);
                    Console.WriteLine(Encoding.UTF8.GetString(input2, 0, input2.Length));

                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }

( I am sorry for my bad English )

You'll need to explain WHY you want to do this. Typically, a server is SUPPOSED to process all client requests as quickly as possible.

It looks like what you are trying to do is not in the spirit of a client/server architecture. In that architecture, a client makes a request. The server cares not who made the request (do you think google cares who is going a search?), and then closes the connection to the client. If the client makes another request, the server does not know or care that it has dealt with that client before.

Ervin:
Now, if i have a client connected, the server dosen't communicate with other clients but those others clients can connect to server.

Do you mean at the same time? Or what? And how does it know which client to accept?