I am playing a game on the 3G network using Android or Iphone. Suppose I am moving from one cell to another; Will the IP Address change? If yes, then how can I continue the same game while changing the base station, as my IP address is already registered in The game server? Is there something DHCP?
closed as off-topic by Josh♦ Aug 17 '16 at 15:18
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Josh
Just as @JustSid said, if you move from one cell to another the handover is handled transparently. The 3G network is just the method of transportation of your data packets, therefore it is a few layers below the IP layer, if you think in terms of the ISO/OSI stack. I worked on a push-to-talk application for mobile phones and all i can say is, that we never dealt with 3G cell changes. We just opened a TCP connection and started sending packets. One thing that also depends on your carrier is the 3G <-> 2G handover. With some carriers it worked fine, with some others we had disconnects.
A HTTP request from a mobile device is routed through a WAP Gateway. These are maintained by the mobile network operators. The WAP Gateway routes the request to the desired server and returns the response to the client.
As far as I know, IP routing on a mobile phone has nothing to do with cell tower base stations as everyone on the same network would be routed through these gateways.
An effective way around this is to send a client a 'session ID' that they can reconnect to IP.
Allocate 2 IPs to the mobile - one of them stays constant (the identifier) & one which varies, (the location). This is termed 'Tunnel-based'.