TCP connections - max users
Posted: Tue Dec 11, 2012 8:15 am
Hello.
I'm new to HMI programming and I have a problem.
I have programmed an Android application for controlling motors that move tables in a greenhouse.
I am using the built-in webserver in a T7A panel to control tags.
It works quite good but I have a problem that it seems that when a connection disconnects from the android pad, it does not seem to do a graceful shutdown.
That will cause the server will be full and I have to wait for the connections to timeout.
I'm using DefaultHttpClient to enable a connection to the panels webserver.
So I want to is what can i do to fix this problem. Off coarse can my problem be in my Android code.
I have a few ideas on how to fix this, so my question is what can or should i do.
//Monzan
I'm new to HMI programming and I have a problem.
I have programmed an Android application for controlling motors that move tables in a greenhouse.
I am using the built-in webserver in a T7A panel to control tags.
It works quite good but I have a problem that it seems that when a connection disconnects from the android pad, it does not seem to do a graceful shutdown.
That will cause the server will be full and I have to wait for the connections to timeout.
I'm using DefaultHttpClient to enable a connection to the panels webserver.
So I want to is what can i do to fix this problem. Off coarse can my problem be in my Android code.
I have a few ideas on how to fix this, so my question is what can or should i do.
- Increase no. of allowed connection from 2 to maybe 10. - Easiest solution for me.
- Decrease the timeout time for the connection to a value that make in useful.
- Make a script that disconnects all tcp-connections set to a timer.
- Maybe writing a udp client-server scenario.
- Create a proxy that the android communicate with. Android -> Proxy -> Panel
//Monzan