<story><title>What they don&apos;t teach you about sockets</title><url>https://macoy.me/blog/programming/Sockets</url></story><parent_chain><item><author>TYPE_FASTER</author><text>What really helped me understand and troubleshoot network communications at the socket level was the book by W. Richard Stevens[0]. I think this is because he starts with an introduction to TCP, and builds from there. Knowing TCP states and transitions is important to reading packet dumps, and in general debugging networking.&lt;p&gt;Also, no matter what platform you&amp;#x27;re using, there is probably a socket implementation somewhere at the core. You&amp;#x27;re best off understanding how sockets work, then understanding how the platform you&amp;#x27;re working with uses sockets[1].&lt;p&gt;Once I read the W. Richard Stevens book, I was able to read and understand RFCs for protocols like HTTP to know how things should work. Then you&amp;#x27;re better prepared to figure out if a behavior is due to your code, or an implementation of the protocol in your device, or the device on the other end of the network connection, or some intermediary device.&lt;p&gt;[0] - &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;www.kohala.com&amp;#x2F;start&amp;#x2F;unpv12e.html&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.kohala.com&amp;#x2F;start&amp;#x2F;unpv12e.html&lt;/a&gt;&lt;p&gt;[1] - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;docs.microsoft.com&amp;#x2F;en-us&amp;#x2F;windows&amp;#x2F;win32&amp;#x2F;winsock&amp;#x2F;porting-socket-applications-to-winsock&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;docs.microsoft.com&amp;#x2F;en-us&amp;#x2F;windows&amp;#x2F;win32&amp;#x2F;winsock&amp;#x2F;porti...&lt;/a&gt;</text></item></parent_chain><comment><author>gwright</author><text>I had the privilege of working for Rich as a junior developer and then later with him as a co-author. He was my mentor and friend. Seeing messages like this over 30 years later really makes my day and reminds me how much I miss him.</text></comment>
<story><title>What they don&apos;t teach you about sockets</title><url>https://macoy.me/blog/programming/Sockets</url></story><parent_chain><item><author>TYPE_FASTER</author><text>What really helped me understand and troubleshoot network communications at the socket level was the book by W. Richard Stevens[0]. I think this is because he starts with an introduction to TCP, and builds from there. Knowing TCP states and transitions is important to reading packet dumps, and in general debugging networking.&lt;p&gt;Also, no matter what platform you&amp;#x27;re using, there is probably a socket implementation somewhere at the core. You&amp;#x27;re best off understanding how sockets work, then understanding how the platform you&amp;#x27;re working with uses sockets[1].&lt;p&gt;Once I read the W. Richard Stevens book, I was able to read and understand RFCs for protocols like HTTP to know how things should work. Then you&amp;#x27;re better prepared to figure out if a behavior is due to your code, or an implementation of the protocol in your device, or the device on the other end of the network connection, or some intermediary device.&lt;p&gt;[0] - &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;www.kohala.com&amp;#x2F;start&amp;#x2F;unpv12e.html&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.kohala.com&amp;#x2F;start&amp;#x2F;unpv12e.html&lt;/a&gt;&lt;p&gt;[1] - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;docs.microsoft.com&amp;#x2F;en-us&amp;#x2F;windows&amp;#x2F;win32&amp;#x2F;winsock&amp;#x2F;porting-socket-applications-to-winsock&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;docs.microsoft.com&amp;#x2F;en-us&amp;#x2F;windows&amp;#x2F;win32&amp;#x2F;winsock&amp;#x2F;porti...&lt;/a&gt;</text></item></parent_chain><comment><author>lanstin</author><text>We had to debug an issue with ARP during a deploy of docker containers a year or two ago.  A nearly complete understanding of the lower layers is not that much knowledge and quite useful at times.</text></comment>