hi Erel,
Yes sometime ,i receve "failed" but is rare (once in ten +-) !? ,in wifi no problem ,vpn no problem but, the problem is only in 3G, if i connect to a ip or DDNS
Sub so_Connected (Successful As Boolean)
Dim s As ServerSocket
Log("GetMyIP:"&s.GetMyIP)
Log("GetMywifiIP:"&s.GetMywifiIP)
If Successful Then
Log("Connection Successful")
Else
Log("Connection Failed")
Log(LastException)
End If
so.Close
End Sub
Sub ConnectButton_Click
so.Initialize("so")
so.Connect("81.11.228.89",502, 5000) 'no response to ping "ip bidon"
End Sub
3G:
03-21 18:18:39.359: I/B4A(27986): GetMyIP:100.70.196.23
03-21 18:18:39.360: I/B4A(27986): GetMywifiIP:127.0.0.1
03-21 18:18:39.360: I/B4A(27986): Connection Successful
03-21 18:18:38.816: I/System.out(27986): [CDS][DNS] getAllByNameImpl netId = 0
03-21 18:18:38.816: I/System.out(27986): [socket][27] connection /81.11.228.89:502;LocalPort=58027(5000)
03-21 18:18:38.816: I/System.out(27986): [CDS]connect[/81.11.228.89:502] tm:5
03-21 18:18:39.352: I/System.out(27986): [socket][/100.70.196.23:58027] connected
03-21 18:18:39.361: I/System.out(27986): [CDS]close[58027]
Wifi:
03-21 18:24:27.517: I/B4A(27986): GetMyIP:192.168.2.105
03-21 18:24:27.518: I/B4A(27986): GetMywifiIP:192.168.2.105
03-21 18:24:27.518: I/B4A(27986): Connection Failed
03-21 18:24:27.518: I/B4A(27986): (SocketTimeoutException) java.net.SocketTimeoutException: failed to connect to /81.11.228.89 (port 502) after 5000ms
03-21 18:24:22.511: I/System.out(27986): [CDS][DNS] getAllByNameImpl netId = 0
03-21 18:24:22.512: I/System.out(27986): [socket][29] connection /81.11.228.89:502;LocalPort=34315(5000)
03-21 18:24:22.512: I/System.out(27986): [CDS]connect[/81.11.228.89:502] tm:5
03-21 18:24:27.515: I/System.out(27986): [socket][30:34315] exception
03-21 18:24:27.515: I/System.out(27986): [CDS]close[34315]