A simple BitTorrent client in go

2,251 views
Skip to first unread message

Jack Palevich

unread,
Jan 21, 2010, 3:06:53 AM1/21/10
to golang-nuts
I wrote a simple command-line-based BitTorrent client in go. It took
me about 8 days, and the result is about 3000 lines of go code.

The code is here, if you're curious: http://github.com/jackpal/Taipei-Torrent

I wrote a little postmortem about the development process on my blog:

http://grammerjack.blogspot.com/2010/01/writing-bittorrent-client-in-go.html

This was a fun project, and go worked very well as an implementation
language for this problem domain.

The most frustrating parts of the project:

+ Getting UDP broadcast to work. (This may be an OSX-specific issue
that may be fixed in more recent versions of the net package. I
haven't had a chance to test the newer code.)

+ Understanding and using the reflect package. (There are still things
about the reflection of interface values and slices that I don't
understand.)

Michael Hoisie

unread,
Jan 21, 2010, 5:01:54 AM1/21/10
to golang-nuts
Awesome write-up, I noticed the project on Github but didn't pay it
too much attention. Now I'll definitely give it a try :)

- Mike

On Jan 21, 12:06 am, Jack Palevich <jack.palev...@gmail.com> wrote:
> I wrote a simple command-line-based BitTorrent client in go. It took
> me about 8 days, and the result is about 3000 lines of go code.
>
> The code is here, if you're curious:http://github.com/jackpal/Taipei-Torrent
>
> I wrote a little postmortem about the development process on my blog:
>

> http://grammerjack.blogspot.com/2010/01/writing-bittorrent-client-in-...

Andrew Gerrand

unread,
Jan 21, 2010, 5:02:45 PM1/21/10
to Jack Palevich, golang-nuts
On Thu, Jan 21, 2010 at 7:06 PM, Jack Palevich <jack.p...@gmail.com> wrote:
> I wrote a little postmortem about the development process on my blog:
>
> http://grammerjack.blogspot.com/2010/01/writing-bittorrent-client-in-go.html

Great writeup. Very interesting reading - I would love to see more of these.

Andrew

Reply all
Reply to author
Forward
0 new messages