TCP Nagle's Algorithm

What problem does Nagle's algorithm solve in TCP?