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
The code above will connect succesfully.
Sub ClientConnected (Success As Boolean)
Try
If Success Then
client.TimeOut = 0
astream.Initialize(client.InputStream, client.OutputStream, "AStreams")
If astream.IsInitialized Then
lblStatus.Text = "Astream is ok"
End If
The ClientConnected method has a problem with astream not being initialized? Only with IOS. Android is working good. Any ideas??