Event When Socket is disconnected? Problems ...

CapReed

Member
Licensed User
Longtime User
Good afternoon,

I'm working with a Socket sending and receiving information from a remote computer. Everything works perfect, but when the wifi short intentionally get an error like "java.net.SocketException: Connection timed out" after running a tw.flush

(I do this because he wants to consider all the possibilities that can give the user including that may be weak in wifi and cutting communication while the process is running)

I think there must be some event to see if there has been a disconnection of the socket, or perhaps an option so you can actually check if the socket is connected before the tw.flush.

I do not know if there is any type of "On Error Goto ..." we used to use the old bad programmers in Visual Basic ... :eek:

Can you help?

Thank you!
 
Top