1. A method of detecting keepalives from stream data on a mobile device, comprising: detecting a message including stream data for a socket; based on information in the message, determining whether to create or update a connection object, the connection object associated with a data structure including an identifier for the connection object and time the socket was created; evaluating the connection object to determine whether a keepalive is detected, the data structure further including a flag for indicating whether the keepalive was detected.