-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matthew Toseland wrote:
> Only after some time (200ms iirc) has passed does a message become
> urgent, and it will cause a packet send by itself. We do however wake
> the sender thread up when queueing a packet; maybe we can avoid this.
How about using Nagle's algorithm for coalescing?
when there's new data to send
if queued data + new data is >= max packet size
send a full-size packet
else
if there's unacknowledged data in flight
queue new data until an ack is received
else
send new data immediately
This is used to avoid sending lots of small packets in apps like telnet
- - the coalescing delay is never more than one round-trip time (unless
the connection times out).
Cheers,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEtee+yua14OQlJ3sRApazAKDCqrLgB5nsRQoG06V88bY6ef7r1ACfWVZ1
3lPfYCJ2+oqhMyC85P4r1os=
=DIz4
-----END PGP SIGNATURE-----