tags:

views:

19

answers:

1

hi, guys,

recently I encounter a problem. I am using two programs A and B, developed by someone else, which use TCP sockets to communicate each other, A is server, B is client. That is what I observed: when I start both A and B, they run and communicate with each other, if I first kill A, then restart A again, now by checking the processes, A is successfully launched, but cannot be connected by B, no matter I restart B. however, If I continue to kill this non-detectable A and start A again, it can be detected by B.

At the same time, if I close B's socket before kill A, then when I start A and B, they work very well.

what the problem might be and is there some way to see the opened sockets when I kill A?

A: 
Benoit Thiery