Private Sub ConnectToServer(Host As String, PORT1 As Int)
Log("Trying to connect to: " & Host)
CloseExistingConnection
Dim client As Socket
client.Initialize("client")
client.Connect(Host, PORT1, 10000)
Wait For Client_Connected (Successful As Boolean)
If Successful Then
xui.Msgbox2Async("Connecting True", "", "OK", "", "", Null)
ClientConnected(True)
Else
xui.Msgbox2Async("Connecting False", "", "OK", "", "", Null)
ClientConnected(False)
End If
End Sub