I think I understand (but I may be wrong ;-)) the principle of Nagle algorithm on sender side: messages can be delayed by the IP Stack on sender side as long as the previous packet has not been acknowledged.
Nevertheless, if a single packet is sent and contains several applicative messages (Mn, Mn+1, Mn+2 for example), how the receiver is able to split the different applicative messages (Mn, Mn+1, Mn+2) from this single packet ?
Is there any flag in the packet to warn the receiver ? Is it related with the PSH flag ? Is it related to Sequence number or Acknowledgment number ? (I don't think so)
Who is in charge of splitting messages on receiver side ? IP Stack or Application ? I think it's IP Stack, but is there a standard option to activate ?
Shall the sender and the receiver send a common configuration ? (for example around deactivation of NO_DELAY option ?)
Thanks a lot for your support.