I've always assumed that Nagle's algorithm affected the socket in both directions, and that setting TCP_NODELAY somehow informed the remote end also to switch off Nagle.
Is that right, or does setting TCP_NODELAY only affect the behaviour of the end that calls it?