Adam Crain
2013-06-27 21:48:19 UTC
Hi,
I have a question about the semantics of "async_write" and the callback.
We are observing unexpected TCP fragmentation that I would think Nagle's
algortihm would optimize for us...
In the protocol we implement, frames get packet-ized into chunks no bigger
than 250 bytes. In some systems we do an application layer ACK for every
frame b/c the protocol was originally design for noisy RS232 serial comms
(it has it's own CRC and transport reassembly).
On TCP, however, the data fragments can be sent back-to-back with no
application ACKs... I would expect that Nagle's in the TCP stack would turn
a series of small async_write calls into a larger TCP frame, but that
doesn't appear to be happening.
What does the callback from async_write mean? Does it mean that the data is
queued for transmission on the stream or does it mean "I packetized this
for you" and shipped it out.
We are definitely NOT disabling Nagle's via the TCP_NODELAY option.
Pardon my ignorance of how this stuff works! The manual for ASIO is quite
good, but I didn't know how to interpret it on this issue.
thank you,
Adam
--
J Adam Crain
Owner - Automatak <http://www.automatak.com>, LLC
pub 4096R/E2984A0C
<http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9B78643BE2984A0C>
2013-05-03 John Adam Crain (Business PGP key)
<***@automatak.com>
<http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x9B78643BE2984A0C>
I have a question about the semantics of "async_write" and the callback.
We are observing unexpected TCP fragmentation that I would think Nagle's
algortihm would optimize for us...
In the protocol we implement, frames get packet-ized into chunks no bigger
than 250 bytes. In some systems we do an application layer ACK for every
frame b/c the protocol was originally design for noisy RS232 serial comms
(it has it's own CRC and transport reassembly).
On TCP, however, the data fragments can be sent back-to-back with no
application ACKs... I would expect that Nagle's in the TCP stack would turn
a series of small async_write calls into a larger TCP frame, but that
doesn't appear to be happening.
What does the callback from async_write mean? Does it mean that the data is
queued for transmission on the stream or does it mean "I packetized this
for you" and shipped it out.
We are definitely NOT disabling Nagle's via the TCP_NODELAY option.
Pardon my ignorance of how this stuff works! The manual for ASIO is quite
good, but I didn't know how to interpret it on this issue.
thank you,
Adam
--
J Adam Crain
Owner - Automatak <http://www.automatak.com>, LLC
pub 4096R/E2984A0C
<http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9B78643BE2984A0C>
2013-05-03 John Adam Crain (Business PGP key)
<***@automatak.com>
<http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x9B78643BE2984A0C>