LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP support library - Maximum of 1024 concurrent connections

Hi,

In all the functions of the "TCP support library" is specified that:

 "You can have a maximum of 1024 connections. If you exceed this limit, -kTCP_TooManyConnections will be returned".

There is a way around this limitation?

Thank you for your precious support.

 

Tavella Fabrizio

Micro Systems S.p.A.

0 Kudos
Message 1 of 6
(4,101 Views)

Hello Fabrizio,

 

thanks for posting in our fo

Unfortunately there is no way for exceed this limitation because these are built in CVI functions.

Furthermore you may not be able to reach the maximum because of operating system limitations of your PC.

Why do you need more than 1024 connections?

 

Kind regards.

 

Giuseppe Barillaro

AE NI Italy 

0 Kudos
Message 2 of 6
(4,073 Views)

Hello Giuseppe,

thanks for your fast response.

I have built a small server receiving connections from clients to exchange data. Currently it never reaches this limit, but it is a significant limitation. The alternative is to open another port for other 1024 connections?

0 Kudos
Message 3 of 6
(4,068 Views)

Hello Fabrizio,

 

yes the only way you have to increase this number is to split the communication in two ports.

 

Kind regards.

 

Giuseppe Barillaro

AE NI Italy

0 Kudos
Message 4 of 6
(4,066 Views)

Hi Giuseppe,

For testing purpose I have developed a small TCP server in C# with Visual Studio (https://msdn.microsoft.com/en-us/library/fx6588te(v=vs.110).aspx). In this case the limitation of 1024 concurrent connection not exists, so this is not caused by OS limitation. This limitation reside inside CVI function or CVI RT-Engine. Why not enlarge this limitation? There's no reason to exists.

0 Kudos
Message 5 of 6
(3,911 Views)

It's quite a bit more complicated than you put it. Windows also does know a limit for the number of possible connections a single process can open. This can be changed in the registry but isn't something that should be blindly increased. Here is a prettty lengthy article about various limits in WinSock configuration: http://smallvoid.com/article/winnt-tcpip-max-limit.html

For Linux systems this setting is also part of the kernel, the maximum there is by default 1024 and if you want to have more you have to change some system configuration values, and for asynchonous socket operations, which is the only way to do the network functions in a reasonable way, your C(++) code has to provide specific measures to make sure it can wait on so many connections asynchronously, which isn't impossible but requires quite some resources. Since CVI is very seldom used to write chat or web servers, this limitation would seem rather academical than any real problem. The latest version of LabVIEW has the same limit.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(3,899 Views)