Any Exception will make the TCP socket broken

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Owen Woo

    Any Exception will make the TCP socket broken

    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.


  • Vijaye Raji

    #2
    Re: Any Exception will make the TCP socket broken

    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

    "Owen Woo" <woomail@163.ne t> wrote in message
    news:#Thhin00DH A.1740@TK2MSFTN GP12.phx.gbl...[color=blue]
    > 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[/color]
    Exception[color=blue]
    > that nothing to do with the socket functions.
    > Why? How can I avoid the socket being broken and make the TCP[/color]
    communication[color=blue]
    > more reliable?
    > Thanks.
    >
    >[/color]


    Comment

    Working...