I am working on Linux (Ubuntu). I understand both these concepts but I want to read the logic for myself. Where is it written in the source code? Some say it is easier to understand it in FreeBSD. Is that true?
I don't know about FreeBSD, but the Nagle algorithm is defined here under Linux Kernel:
https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_output.c
With the static function: tcp_nagle_check
.
Hope this help.
Regards.