If this is a subject that interests you, I highly recommend the book Where Wizards Stay Up Late[0]. This blog post really just scratches the surface. And if reading about network protocols is your kind of thing, I definitely suggest reading the RFC[1].
0. https://www.goodreads.com/en/book/show/281818
1. https://www.rfc-editor.org/rfc/rfc33.html
edit: formatting