I have an existing application where UMAC communicates with host computer over Ethernet over 100 meters distance through a couple of Ethernet switches. The host application uses PCommServer drivers.
After several months of observation, it is observed that there are data breaks in the Ethernet link on rare occasions. In host software, I am checking for interruption by sensing an unlikely set of field input values. In case of interruption, I am closing the communication by the call PmacDoc.Close(0) and then trying to re-open the communication by the call PmacDoc.Open(0, pbSuccess). When the opening call is a success, the host application resumes its work. Sometimes it so happens that host application has to close without issuing a PmacDoc.Close(0) call.
In this process, it is observed that after a few days involving a few data breaks, UMAC is "holding" a TCP/IP connection even if the host application is not running. Observation is, UMAC communication works ok upto 4 TCP connections. When UMAC holds up all 4 connections, PmacDoc.Open(0, pbSuccess) fails even if ping is a success.
Then the only alternative is to switch off the power to UMAC and then to switch it on again.
To avoid this scenario, I would like to know if there is a command in PCommServer command set for releasing all the TCP/IP holdups. Maybe there is a command for graceful closing the communication which includes releasing all the holdups.
I know some devices having TCP/IP communications having "reset" port. A connection to this port results into release of all the connections including the connection to reset port itself.