Add-Ons & Services

TcpServer limit ?

A general discussion forum.
Posts: 4
Joined: 14 Jan 2011, 21:56

TcpServer limit ?

Postby ZeOntje » 27 Jun 2011, 10:41

Hell everyone

I've made an application that connects to different devices.
Each device is a thread that holds a connection to the device using a socket. Each thread holds a TcpServer that is also connected to that device socket.
This is used so we can have multiple connections to each device using the tcpserver.

Let's say we have 25 of those devicethreads.

When I try to connect with another application to all the TcpServers; only the first 14-15 requests are answered.
If I for instance write to the console in the TcpServerConnectionFactory: "Request made to server x" where x is the server that replied:
I will get "Request made to server 1, 2, 3, 4, -> 14/15."
If the connection is handled (finished), I will not be able to connect to the other 10/11 devices (device 15 -> 25). This is the major problem.

If the requests to the server are made in reverse: so 25, 24, 23, 22, ...
then the console will read : "Request made to server 25, 24, 23, 22, -> 10/11"

So it's able to communciate with all the devices on the other end of the TcpServers but it's as if it has a limit on the of the tcp servers that it can allow.
This is on windows xp / sp3.

Any ideas anyone?


Posts: 4
Joined: 14 Jan 2011, 21:56

Re: TcpServer limit ?

Postby ZeOntje » 28 Jun 2011, 08:27

I think I found the solution.
For the people having similar problems.
The TCPServer uses a ThreadPool, this threadpool (on my platform) allows max 16 connections.
I'm using a larger threadpool now that is shared between all the TCP servers. I hope this is a good thing to do?

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest