Hi,

I write simply tcpserver and I have problem with incomming connections...

Qt Code:
  1. void Server::incomingConnection(int socketId)
  2. {
  3. qDebug()<< "incomming connection";
  4.  
  5. if( mClients.size() < 10 )
  6. addClient(socketId);
  7. else
  8. qDebug()<< "server is overloaded";
  9. }
To copy to clipboard, switch view to plain text mode 

so server accept only 10 connections but next clients can connect to server ( its socket state is QAbstractSocket::ConnectedState ).

How I can refuse next connection? I would like advise new clients, that server is overloaded and maybe prepare some timeout for waiting.

How I can do that?
Thanks,