Sorry the request is:
I have tested AsyncStreamObject for send and receive text and image from device to another device;
If the device are in local network, this works well.
but if the device are in internet connection (not in local network) this not longer works.
is it possible to do something now?
Dim hc As HttpClient
hc.Initialize("hc")
req.InitializeGet("http://ipecho.net/plain")
hc.Execute(req, 1)
Sub hc_ResponseSuccess(Response As HttpResponse, TaskId As Int)
ipall.Text = "Indirizzo IP: " & Response.GetString("UTF8")
End Sub
Sub hc_ResponseError(Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Msgbox("Errore IP - " & Response.GetString("UTF8"), "")
End Sub
Then I get a public IP address; can I use this IP address?
It works if I use local address but not works if I use this public IP. Why?
(I use AsyncStreams)
Yes. This is the ip from the device calling this url.
If you have devices A and B and A is calling this url. A knows the ip of itself now.
B call the same url, get another IP. B is knowing the ip of itself now.
But how do you realize that A know the IP of B and B knows the IP of A?