'============================================================================================
Public Sub Testconnection(ipaddr As String, port As Int, timeout As Int)As ResumableSub
Dim testSocket As Socket
ConnStatus = False
If testSocket.IsInitialized = False Then
testSocket.Initialize("ipc_socket")
testSocket.Connect(ipaddr, port, timeout)
End If
Try
Log("Connect to Server - Wait for Connection")
Wait for ipc_socket_Connected(Successful As Boolean)
Log("Connect to Server - Socket Connected")
Catch
Log("Connect to Server - Socket try failed")
End Try
If Successful Then
Log("Connect to Server - Socket Found")
ConnStatus = True
testSocket.Close
Return True
End If
Log("Connect to Server - Socket Not Found")
ConnStatus = False
Return False
End Sub