5 ms·
Beej's Guide to Network programming (http://beej.us/guide/bgnet/ http://beej.us/guide/bgnet/) is also pretty good. It was effectively used as the textbook in my
by yorwba 9y ago
Beej's Guide to Network programming (http://beej.us/guide/bgnet/ http://beej.us/guide/bgnet/) is also pretty good. It was effectively used as the textbook in my networking class. (There was also an actual textbook, but almost nobody bothered to read it.)
- saagarjha 9y agoSecond this guide. It’s pretty short, but it has everything I’ve seemed to need at least.
- nurettin 9y agoThis has been around for 15+ years. I wouldn't be surprised if it is recommended to every newcomer on forums and chat channels.
- da02 9y agoWas there anything in the textbook that was explained better than in the Beej Guide?
- TallGuyShort 9y agoI would wager the textbook probably covered history & development, various topologies, congestion control algorithms, queueing theory, etc. There is more to networking than programming sockets. But for a guide on programming sockets, which is all it sought to do, yeah it's excellent.
- TorKlingberg 9y agoIt's definitely worth reading, but be aware that it's quite old-fashioned in that it focuses entirely on blocking I/O and select(). Also this page fails to explain why you would call shutdown(): http://beej.us/guide/bgnet/output/html/multipage/shutdownman.html http://beej.us/guide/bgnet/output/html/multipage/shutdownman...
- da02 9y agoThanks for pointing this out.
- nix0n 9y agoWhat has replaced select()?
- elromulous 9y agoepoll on linux. Other apis on other oses. More reading: http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- fish_fan 9y agoKqueue on the bsds and darwin.
- jandrese 9y agoAlthough there is a case for still using select(). If you're looking at avoiding porting headaches and aren't dealing with a large number of descriptors then select() still works fine. The alternatives are mostly necessary when you're dealing with large numbers of connections (thousands), which most people aren't. Of course there's also the slight problem that select()'s interface with the file descriptor packing macros and the unusual requirement to figure out which file descriptor is the largest numerically that might push people to the alternatives. That is also a valid reason IMHO.
- dgoodell 9y agoDo you perhaps have some examples of some more modern resources or examples we can consult? I would appreciate it.
- anilakar 9y agoBeej's guides are the best way to get started quickly (i.e. in the time frame of a university course). For a more thorough introduction, one should probably read "Advanced Programming in the UNIX Environment" and "UNIX Network Programming", both from Richard Stevens. Jens Gustedt has also written a rather nice ebook on how to program in modern C: https://gustedt.wordpress.com/2016/11/25/modern-c-is-now-feature-complete/ https://gustedt.wordpress.com/2016/11/25/modern-c-is-now-fea...
- agumonkey 9y agoI've seen this suggested in many reddit or other websites threads. Also in college classes yes. Used it to implement ICMP echo heh.
- noxToken 9y agoI will also share praise for Beej. My network programming course was in C, and most of my programming experience had been in Java, Python, and JavaScript. This guide was probably the reason I passed.