TCPIP servr - NumberOfConnections - not working [solved]

Hi,
im using TCPIP servr from example which is in API reference (NET+OS 7.3 - updated with latest patches). I found one problem, I can have more connection then is specified in NumberOfConnections.
I have NumberOfConnections = 2, but it is no problem to connect more than 3 times. So where is the bug?

The Listen and accept is standart implemetation:

if (listen(theSocketFd, NumberOfConnections) < 0) {
printf ("Listen failed
");
closesocket(theSocketFd);
return;
}

while(1)
{

	theChildFd = accept( theSocketFd, (struct sockaddr *) &amp;theClientAddr, &amp;theClientAddrLen );
    if (theChildFd &lt; 0)
    {
        printf("Accept failed

");
continue;
}

.......	        

}

I may work, but it is not, any ideas?

Thanks Jirka

Message was edited by: kubiajir

I will answer my selve. NumberOfConnections is number of pending connections, that’s connections which are waiting for connections (accept function).