Reuse connections
Opening a new TCP connection will require the radio unit to go to the high-power state and then actually send some data to the server. By contrast, an idle connection lurking around doesn't need to use any power until some payload data has to be sent. We learned that we should reuse connections on desktop systems, but this is doubly true on mobile.
If the radio unit goes to the idle state, the TCP connection won't be terminated by the network equipment and will be still there when the radio switches to high power. However, there are some timeouts employed by network and NAT routers that will terminate idle connections. So, if we want to keep our connections alive, we should periodically send keep-alive messages. Various ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access