I believe the "correct" way to do it would be to have a server in the middle, which keeps the connection alive, buffers the necessary data, and sends a notification to the device when appropriate. That is, unlike a desktop or a laptop, a tablet or smartphone is not designed to be a fully independent device.