Android Question WebSockets

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to all.
Perhaps this is silly question.
I successfully just tried B4j_WebSocket with B4A_WebSocketExample, on Windows8. It worked immediately on my machine, which is in my local network. This is quite interesting for my typical uses. In fact, in the past, I successfully used B4A as a client of WebServices, which were running on my provider's server and made with Asp.net c#. Latest developments on VisualStudio are a little discouraging so I am examining the alternative represented by the above mentioned working framework (B4j+B4A and perhaps B4i too). My problem is now to extend the local test to connect computers not in my local network. The basic question concerns the Ip Address that must be changed in the client. For example, local ip of my computer is 192.168.1.2 while "What Is My Ip address" is 78.134.xx.yy, that should be the provider's address (I am not so expert of such kind of things), even not the Ip address of my router... I have also read the possibility of using DuckDns, but still the problem seems to exist, because actually I don't know my Ip Address.
Thanks for reading and, possibly, for answering.
 

LucaMs

Expert
Licensed User
Longtime User
You should (write italian :D) "study" port forwarding and NAT (you can find many info about them on WEB, in italian).

You have a public IP of your router, a private IP of your PC, then you need a public fixed IP for your router (or you can use some internet services to "bypass" this problem) and set a "port forwarding" so that the requests reach the server on your pc.
 
Last edited:
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Salve.
Grazie per i consigli. Putroppo è come pensavo. Il link sembra utile, e magari posso provare . Mi serviva una conferma sulla situazione, perché devo decidere come proseguire questo tipo di esperienza.
 
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Thanks. I had no idea of where to post the question. Actually the IpAddress definition is in the B4A client, so I decided for B4A forum. In case, I will post on B4j forum.
 
Upvote 0
Top