Ok, thanks for reply
This function returns immediately because listener can receive a connection.
But why when first client trying to connect it wrote the message of the case when we are connected and at server it don’t run any of cases(neither client connected message, nor error message), which means what isReady function returns false(this contradicts the fact that any of the sockets are ready) and continues to run the loop without waiting timeout, which means what listener can receive new connection, but when i’m trying to connect to second client, it wrote the error-message and at server it still run the loops, which are doing nothing. So, what is my problem?