# TCPIP servr - NumberOfConnections - not working \[solved\]

**URL:** <https://forums.digi.com/t/tcpip-servr-numberofconnections-not-working-solved/5913>\
**Category:** NET+OS\
**Created:** [July 26, 2008, 1:39pm UTC](https://forums.digi.com/t/tcpip-servr-numberofconnections-not-working-solved/5913 "2008-07-26T13:39:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubiajir](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@kubiajir](https://forums.digi.com/u/kubiajir)\
**Post date:** [July 26, 2008, 1:39pm UTC](https://forums.digi.com/t/tcpip-servr-numberofconnections-not-working-solved/5913/1 "2008-07-26T13:39:03Z")

</div>

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).
