News for hackers. Stuff that matters.
Re:Beej's Guide to C Programming (2007) by yorwba on Friday September 08, 2017 @03:01AM (#15198349)
Beej's Guide to Network programming (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.)
Re:Beej's Guide to C Programming (2007) by TorKlingberg on Friday September 08, 2017 @04:44AM (#15198768)
It'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...
Re:Beej's Guide to C Programming (2007) by dgoodell on Friday September 08, 2017 @10:13AM (#15200269)
Do you perhaps have some examples of some more modern resources or examples we can consult? I would appreciate it.
Re:Beej's Guide to C Programming (2007) by da02 on Friday September 08, 2017 @04:56AM (#15198813)
Thanks for pointing this out.
Re:Beej's Guide to C Programming (2007) by nix0n on Friday September 08, 2017 @10:09AM (#15200245)
What has replaced select()?
Re:Beej's Guide to C Programming (2007) by jandrese on Friday September 08, 2017 @03:20PM (#15203196)
Although 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.

Re:Beej's Guide to C Programming (2007) by elromulous on Friday September 08, 2017 @10:19AM (#15200309)
epoll on linux. Other apis on other oses.

More reading: http://www.kegel.com/c10k.html

Re:Beej's Guide to C Programming (2007) by fish_fan on Friday September 08, 2017 @12:07PM (#15201366)
Kqueue on the bsds and darwin.
Re:Beej's Guide to C Programming (2007) by anilakar on Friday September 08, 2017 @05:51AM (#15199011)
Beej'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-fea...

Re:Beej's Guide to C Programming (2007) by nurettin on Friday September 08, 2017 @03:48AM (#15198562)
This has been around for 15+ years. I wouldn't be surprised if it is recommended to every newcomer on forums and chat channels.
Re:Beej's Guide to C Programming (2007) by noxToken on Friday September 08, 2017 @08:29AM (#15199662)
I 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.
Re:Beej's Guide to C Programming (2007) by agumonkey on Friday September 08, 2017 @05:30AM (#15198930)
I've seen this suggested in many reddit or other websites threads. Also in college classes yes.

Used it to implement ICMP echo heh.

Re:Beej's Guide to C Programming (2007) by saagarjha on Friday September 08, 2017 @03:06AM (#15198376)
Second this guide. It’s pretty short, but it has everything I’ve seemed to need at least.
Re:Beej's Guide to C Programming (2007) by da02 on Friday September 08, 2017 @04:34AM (#15198723)
Was there anything in the textbook that was explained better than in the Beej Guide?
Re:Beej's Guide to C Programming (2007) by TallGuyShort on Friday September 08, 2017 @11:51AM (#15201189)
I 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.