I am trying to get a client which tries all 5 seconds to connect to a server which doesn't need to be online. Only if it is online it should connect. Well if the server is already online and the client starts then, the message will be sent without any problem. but if the client starts first it waits a certain time until timeout and stops trying to connect. So I am trying to get a Loop with the command:
Client = New TCPControl2(ip,64555)
I tried to do this:
Try
Client = New TCPControl2(ip, 64555)
Catch ex As Exception
MsgBox(ex.Message)
End Try
It could me in the MsgBox about Timeout, but I don't know how to do a kind of Try Until it is connected or just set up the timeout time but i don't know that either.
Private Client As TCPControl2