Requests to the server, an example of communication with the server

Good evening. I bought 2 books. 3D and 2D games. Interested in the question, where you can get instructions on access to the server side of the application, perhaps in some book from the market. Send and receive requests from the web.

Briefly describe the situation, there is a 2D game. Some data such as the status of bonuses, gold and crystals are obtained by the usual request. The main gameplay in rialtime gets information from the server about the positions of enemies who are also people. Something like an online shooter.

I will be grateful for the sample, the instruction or the link to the book in your market, with the test working application.