Hi,
I write simply tcpserver and I have problem with incomming connections...
Qt Code:
void Server::incomingConnection(int socketId) { qDebug()<< "incomming connection"; if( mClients.size() < 10 ) addClient(socketId); else qDebug()<< "server is overloaded"; }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,
Bookmarks