I have to send data from Android phone to a server very frequently say every 100ms.(battery is not an issue). I am debating with myself whether it is OK to use the standard Java URL connection for this purpose or to create my own custom socket implementation using SocketChannel. I have full control over both endpoints and free to choose anything I want. What are pros and cons of each of these methods? Any other approach? Note that I already tried Google XMPP. But found that many data points were getting dropped. Received no reply from Google about it.
Note that reliability is a primary concern. I must get every sample in real time unless of course there is some problem in radio link itself. Please provide some pointers.