Click to See Complete Forum and Search --> : Real-World C code example


slacker_x
10-24-2001, 01:27 AM
I have read my way through a moderate amount of documentation and tutorials on C. I think I could learn a lot by looking at some real-world unix C code.

I am looking for source code to read and perhaps modify. I want to look at something that is:
-fairly well documented
-relatively simple
-a demonstration of good coding style
-command line

Bonus points for suggesting something that has to do with networking. I'm interested in how that works.

I hope I've given enough info. If not, let me know what you would like to know.

Strike
10-24-2001, 02:22 AM
www.codeexamples.org (http://www.codeexamples.org)

slacker_x
10-24-2001, 02:57 AM
Originally posted by Strike:
<STRONG>www.codeexamples.org (http://www.codeexamples.org)</STRONG>

Cool. Just bookmarked that page.
It's not exactly what I had in mind though. I was looking for the name of an actual program though. Something like "cat" or "less" except related to networking.

EscapeCharacter
10-24-2001, 04:37 AM
ping?

Stuka
10-24-2001, 12:38 PM
Hmmm...fair warning - networking code in C is not simple, often not well documented, and... well, you get the point. That said, I do have a copy of some ping source code that I can send you if you're interested.

slacker_x
10-24-2001, 05:00 PM
I guess I'll take a look at ping when I get a chance. That probably won't be for a while though.....I need more time.

Pinball
10-25-2001, 05:02 AM
I dunno how far did you get with C programming, but if you REALLY want to learn network programming, let me suggest:
"Unix Network Programming" by W. Richard Stevens. I found it great