Any Exception will make the TCP socket broken

  • Thread starter Thread starter Owen Woo
  • Start date Start date
O

Owen Woo

My application sets up TCP socket to communicate with another applcation,
and the TCP socket is very important to me. But I found that any Exception
will make the TCP socket connection broken, even if there is a GDI Exception
that nothing to do with the socket functions.
Why? How can I avoid the socket being broken and make the TCP communication
more reliable?
Thanks.
 
Separate the GDI routines from the TCP routines..

Put all the GDI routines within a try catch block. Handle any exception and
let the program continue without breaking..

-vJ
 
Back
Top