Hi,
I have a server that handle many client connection. In the case that
the server try to send a message to a client.
When the server is doing the mySocket.send(myMessage) and the client
connection is already broken, what is the best way to handle this?
Exception raising cost very much in time, does catching only like this
code sample is doing is good?
''''''''''''''''''''
Try
If (Not mySocket Is Nothing) Then
If (mySocket.Connected) Then
mySocket.Send(myMessage)
End If
End If
Catch
'do something
End Try
''''''''''''''''''''
In this case, the "mySocket.Connected" does not detect that the
connection is not good between client and server and it still try to send.
Thanks
Marty