Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recovering from TCP/IP errors gracefully

Status
Not open for further replies.

rossmcm

Programmer
Jun 28, 2000
16
0
0
I have a delphi app that needs to communicate regularly with several (about 30) ethernet-based Serial and Digital I/O nodes made by Moxa. These nodes (Moxa NE 4110S) implement a COM port and 2 inputs and 2 outputs at the end of an IP address. I talk to the serial port via standard COM port API calls in combination with a piece of software from Moxa that creates a virtual COM port. I talk to the digital I/O by using the TSocket methods Connect, Send, Recv, CloseSocket.

This all works fine, most of the time. However it does not seem tolerant of errors. Occasionally the system fails in a mode where none of the TCP/IP communications to any node is successful and it never recovers. I haven't seen the problem on site (isn't it always the way), but if try to recreate the problem on the bench by unplugging a node, I see 10054 errors (expected, I guess) and more often than not it doesn't recover.

My question. What is the best way to recover from these occasional errors. I've tried closing and repoening the socket without success. Sometimes the node gets itself into a knot and I have to power it down.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top