6

I'm currently building an application that is intended to run on an embedded system hooked up to a cellular data card. I've been made aware of some low-data plans from several carriers, and our application only generates about 5 bytes/second, lending itself to such plans.

However, I can't seem to figure out if the TCP/IP header overhead (about 40 bytes, give or take) is included in the calculation for data usage. Since I need real-time data, I've disabled Nagle's algorithm. This means for each 5 byte burst I send out, I'm sending out a new header. If TCP/IP headers are factored into the data usage pricing, it will dwarf the amount of data I'm sending.

4

2 に答える 2

6

はっきりとは答えられませんが、そうしなければならないと思います。そうしないと、ヘッダーに余分なデータを追加することで悪用される可能性があります。TCP では、40 バイトのパケットを送信してから、40 バイトの確認応答パケットを受信します。確認応答パケットでデータを浪費する必要がないように、TCP の代わりに UDP を使用してみてください。

于 2011-03-16T14:39:22.863 に答える