TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Beej's Guide to Network Programming

245 pointsby alanthonycabout 12 years ago

25 comments

daaveabout 12 years ago
When I was at university I wanted to take a class that had 'introduction to computer networks' as a prerequisite, but I didn't want to wait 2 semesters for it to come around again after taking networks first. I spoke to the professor and he said he'd let me enroll in the course if I promised to carefully read Beej's guide first, since it contains all the essentials I'd <i>really</i> need for this follow-on. So, this saved me 6 months, what a golden nugget!
评论 #5243473 未加载
评论 #5242707 未加载
ambrop7about 12 years ago
Still not updated to mention anything more than select() as far as non-blocking IO is concerned, like poll, epoll, or, god no, using an abstract event loop. Nobody who cares about their code and sanity does blocking I/O with sockets.<p>But then, I must confess I too started network programming with this guide :) It presents the basics nicely, but there's a lot more you should learn about network programming.
评论 #5242193 未加载
评论 #5242180 未加载
kqr2about 12 years ago
Is there a similar or updated guide some place which includes non-blocking i/o?
评论 #5242159 未加载
评论 #5242231 未加载
评论 #5242254 未加载
tezkaabout 12 years ago
it's a shortcut to learn basic network programming with sockets, without spending too much time on it. Anyone more than casually serious about it should consider looking at Richard Stevens books, Unix network programming and TCP/IP illustrated (esp. volume 2).
评论 #5245488 未加载
philhippusabout 12 years ago
For this community, I would have thought this is a bit like seeing a link to Google.com on the HN front page. Beej's guide is staple internet fodder.
sp332about 12 years ago
This was an absolute lifesaver when I was thrown into the deep end writing a high-performance TCP server from scratch. I think it's so effective because it's "highly opinionated", which is to say, he points out "Foo does this, but don't use it because that's just silly" or "don't use bar, use baz instead because it handles qux more easily" and so on.
评论 #5242043 未加载
mattpardeeabout 12 years ago
If I'm not mistaken this original document was on Chico State's computer science domain. It was my understanding Beej went to Chico; does anyone know for sure? This was around long before 2006, I remember reading it around the year 2000 when I was first getting into C++. (miracle this quality of a document escaped anyone's brain in Chico -- I know, I went to CSUC. Let's just say it was hard to concentrate there :)
评论 #5241920 未加载
评论 #5242685 未加载
评论 #5242546 未加载
评论 #5242393 未加载
评论 #5241927 未加载
wuestabout 12 years ago
This is one of those priceless documents that served me well, and which I have recommended to many others as a great starting place.
X-Istenceabout 12 years ago
Still refer to it every so often, especially as backup documentation from the man pages when something isn't entirely clear.
thrushabout 12 years ago
learning from this now. glad its got all this credibility! (context: college operating systems course)
评论 #5242067 未加载
curiousDogabout 12 years ago
Like others, this is how i learned to do it too. The C programming guide is very good too
infoseckidabout 12 years ago
I owe this guy my entry into network programming and eventually security.
评论 #5242235 未加载
enterxabout 12 years ago
lol soooo retro! brings back memories almost 10 years old. i used it as a guideline for writing an SMS notifier on incoming e-mails through free HTTP SMS service. with auth. ;)
lightbladeabout 12 years ago
+1 !!<p>This is the number one thing that got me through network class back in university. Next to that is the professor's office hour. I don't think I even touched the textbook.
novamantisabout 12 years ago
Is there an even better, more modern networking guide that's free (or not)? Does anyone have a list of networking reference/tutorial/introduction material?
tumanianabout 12 years ago
Wow, I am glad that this is still around - the first tutorial that I learned socket and network programming back in 2004.
paolordabout 12 years ago
Its nice to know other guys learned from this as well. Makes me feel that what I learned back in college was legit.
demianabout 12 years ago
This saved me when I had to write a P2P file distribution system for a project in college.
jcknightabout 12 years ago
This was the go-to guide back in its times. Circa 2006?
CoryG89about 12 years ago
This was my first look at networking. Worked for me.
dashN9neabout 12 years ago
I learned from this in 2006-2007.
markwongabout 12 years ago
truely classics. i learned network programming from this guide a decade ago.
xtremejames183about 12 years ago
A reference for beginners!
nillortabout 12 years ago
At first, I was confused, thinking that the porn site beeg.com posted a networking tutorial.
L0j1kabout 12 years ago
This is how I learned to do it.