Unsolved Qtcpserver
-
Qtcpserver set max connections but it not working how to limit connections Qtcpserver
-
Hi
How do you know its not working ?
Docs says
"Clients may still able to connect after the server has reached its maximum number of pending connections (i.e., QTcpSocket can still emit the connected() signal). QTcpServer will stop accepting the new connections, but the operating system may still keep them in queue."So which part do you think is not working ?
-
it should accept after maximum connections
-
@satyanarayana143
Hi
you mean Not accept ? -
yes should not accept
-
Well it should not. As doc says.
What Qt version are you using ? -
QT5.13.2
-
Hi
I cant find any bug reports on that so I will assume it works as it should.Maybe you expect something different. It limits incoming connections.
https://forum.qt.io/topic/8323/solved-qtcpserver-max-connection-limit
-
@satyanarayana143 said in Qtcpserver:
Qtcpserver set max connections but it not working how to limit connections Qtcpserver
As far as I known, QTcpServer does only have
setMaxPendingConnection()
, I can't seesetMaxConnection()
...
This are the connection requests send by client sockets which are waiting to be processed. You don't have to accept them, they can be rejected!The amount of established connection only depends on your implementation.