This might be better put in a topic separate from C, its own topic, since the network socket interface is accessible in Java, C#, Python, PHP, NodeJS, etc. . Since the socket api is written in C itself, the system calls, and most languages will use these same C system calls, I think it still works to offer the main explanation in C, then either have an example server and client in every language PHP, Ruby, Java, C#, Obj-C, etc