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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TCP/IP question (what appends when connection drops)

Status
Not open for further replies.

dfb500

Programmer
Oct 31, 2005
1
US
Hello, I work with an application in the Healthcare Industry that acts as a HUB for all of the different transactions generated by the Hospital. The app establishes TCP/IP protocol connections with various applications and all of the TCP/IP rules are handled under the covers. I am connecting to one homegrown Windows app that is having problems recognizing when my app shuts down the TCP/IP connection. Usually when this happens the other app release there port and indicates the connection is shutdown. This app I am working with will not acknowledge the shutdown and therefore my app cannot reconnect because the port is still busy. The questions, what usually would be sent out when I shutdown the connection? is this a sighup or something else? Would this be a standard TCP/IP signal that is sent? My application sits on AIX and like I said this stuff just happens, it is not documented to that level what ocurrs on the tcp/ip level. My guess is the other guy doesn't know much about TCP/IP and hasn't coded properly. (Not that I know anything better)

Thanks
 
You need to download and install Ethereal so that you can actually see what is actually happening. Normally on a disconnect, the disconnecting party sends a FIN packet, to which the other host should send a FIN/ACK, and finally the original host should send a FIN/ACK.

In all likelihood, one of the two parties isn't properly handling the handshake.

Ethereal will let you capture the packets and watch them in real time. It will allow you to look at the entire IP packet, and even the Ethernet header.


There are binary builds of Ethereal for the AIX platform in case you don't have a compiler on your system.

But if the Windows app is written correctly, it should allow multiple simultaneous connections from the same machine. As long as your source port number changes, it shouldn't matter that the destination port is the same. I've seen several Windows programs written by people who did not understand multi-threading or the Windows networking API that would only accept a single connection. you could verify this by telnetting to that port from two xterms.
Code:
telnet <ip_address> <port>
If the second connection is rejected, then you probably have this type of problem.


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top