I am sending small amounts of data (up to 100 bytes) every 10 minutes from devices to TCP server. In my case overhead seems to be huge (we pay for each byte). I found that I have at least 7-10 packets (three-way handshake (3), request with ack(2), response with ack (2, optional) and tear down(3)). Total overhead is at least 400 bytes (40 bytes TCP/IP header for each packet).
Questions are:
- What is efficient way for sending such small amounts of data reliably? (UDP with ack?)
Why my headers are bigger than 40 bytes (60 or 52)? For example this one:
0x0000: 4500 0034 73d7 4000 3506 d2ee 5c17 1b9b E..4s.@.5...\... 0x0010: 2599 61b3 be7e 23a3 31a9 710a 6a2f 6371 %.a..~#.1.q.j/cq 0x0020: 8010 0073 2672 0000 0101 080a 02dc 02ef ...s&r.......... 0x0030: 1dc2 dad6 ....
How can I print key-value list of headers instead of hex values? (that's minor)