how to connect with local server please tell with whole procedure?
It really depends of the server application you want to use.
Basically, you have to do at least the following. Steps with stars (*) may be optional, depending of the framework you use.
- Write the code for the server
- *If the server application do some host verification, add to the allowed hosts the IP of the network card connected to your router
- *Forward external port on your system to server port
- *Create firewall rules to allow traffic on this port
- Run the server on your local machine, it should listen on a specific port (internal)
- Write the code to communicate to the server, you can hardcode the server ip:port as long as you are debugging, but don’t do this in production
- Build your application
- Install it on the android device
- Run it, if your setup is correct, you should get an answer from the server to your requests
You can find full working example of game servers written in .Net Core on GitHub. You should adapt it to your needs:
can you please provide with a complete code??