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.

Building a BitTorrent client from the ground up in Go (2020)

580 pointsby stargraveover 2 years ago

16 comments

adastra22over 2 years ago
Thanks, this is really cool. I don't have anything to add; I just want to let the author know this is appreciated. I recently decided to learn Go, and articles like this are a great way to get a feel for how Go programmers think about solving problems with the tools available to them. The kind of knowledge you don't get from just skimming The Go Programming Language and such.
评论 #33499495 未加载
throwaway894345over 2 years ago
This didn’t dive into it, but I appreciated the suggested search terms for information on decentralized peer discovery. I always wondered how that would work, especially the bootstrapping process. Ultimately I found this StackOverflow answer to be really helpful: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;22240583" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;22240583</a>
评论 #33498122 未加载
unboxingelfover 2 years ago
As someone who writes Go code daily, nice Go code!
评论 #33504770 未加载
mdanielover 2 years ago
The project author&#x27;s previous submission: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21958359" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21958359</a>
评论 #33497938 未加载
chrsigover 2 years ago
Great post<p>One nit, with the font:<p><pre><code> l4:spami7ee </code></pre> the first two characters look an awful lot like the number &quot;14&quot;, when they&#x27;re actually &quot;L4&quot;. I&#x27;m not sure if bencoding is case sensitive or if anohter font may better differentiate the two, but that may be something the author may want to poke at if they happen to read this comment :)
评论 #33508332 未加载
评论 #33498460 未加载
riley_dogover 2 years ago
This looks to have been written on Jan 4, 2020.
评论 #33500479 未加载
merpkzover 2 years ago
&gt; &quot;They’ll send us an unchoke message to let us know that we can begin asking them for data.&quot;<p>What is the purpose of that choke part when connecting to remote peers? Is that some kind of flood protection?
评论 #33502755 未加载
3ln00bover 2 years ago
Very helpful. Can someone recommend more of these learn by doing programming blogs?
评论 #33503136 未加载
LinkLinkover 2 years ago
Hey Jesse, we went to school together but I&#x27;m sure that&#x27;s a ton of people you know by now ;). If you can figure it out hit me up ill show you some Zebra industry stuff I&#x27;ve reversed.
tommicaover 2 years ago
Really nice share! I think I&#x27;ll have a follow-along with this next weekend to improve my go skills and try to learn rust by attempting to port this to it.
palataover 2 years ago
It is only downloading, right? Is that tolerated?<p>Anyway it&#x27;s a cool post! Would be nice to see a follow-up for the upload&#x2F;sharing part!
评论 #33507461 未加载
评论 #33499497 未加载
评论 #33507126 未加载
jbirerover 2 years ago
One of the best posts lately. Thanks.
hknmttover 2 years ago
this is good info. i was thinking about making my own, before i discovered picotorrent. but the lack of ui libraries for go prevented me from moving forward. nowadays, with nuts and others, it might be worth a shot.
amits1995over 2 years ago
what happens when the peer is behind NAT? you need to be able to use TCP Hole Punching
评论 #33503124 未加载
UltraViolenceover 2 years ago
Personally I would&#x27;ve preferred a Rust implementation, but nice article nonetheless.
odo1242over 2 years ago
nice cartoons! :D