Monday, May 26th, 2003: ...or is it?



regolith
Isn't It?
05/25/03 10:09:04 PM
by: regolith - mood: normal
Burgundy Mage is in for a surprise if he opens THAT box! :p

Mu-ha! Mu-hah! MUAHAHAHAHAHAHAHAHAAAAA! This plotline will never die!

--regolith

regolith
Okaaaay...
05/27/03 09:22:11 PM
by: regolith - mood: flying
So last weekend, I was looking for something to do and somehow ended up on the bittorrent protocol page... So now I'm developing a bittorrent client in C#. Hooray!

Vexingly, for client-tracker communication, there's no concept of string encoding and no distinction between binary strings and text strings, so I just keep them as byte arrays until I know they're filenames or ip addresses or something, then I convert with utf-8. (.NET makes that easy, at least)

One gripe about .NET is that there's a BinaryWriter that lets you write ints and stuff out as bytes, but there's no flag or anything to make it output big-endian. I finally found the good old HostToNetworkOrder style functions as static methods in IPAddress of all classes. Maybe I'll make some kind of BinaryWriter/Reader wrappers that do the conversions for you...

One odd thing about the bittorrent protocol that proves it was made as a secret DDOS weapon is that when you tell the tracker you want to start downloading (and thus invite other people to connect to you) you can give it a different IP address (and port) than the one you're coming from... I don't know if any trackers actually allow it (trackers should be quite easy to make as cgi scripts), but it seems like you could sign your least favorite website up on all the popular trackers as having a seed for each of the most popular anime/pr0n/lunix iso files and have a ton of people connect to their port 80 for the freebies. Or just post a TheMatrixReloaded.DVD.ForRealZ!.mpg.torrent on a newsgroup and list their website as the tracker. Owel, time will tell, I guess.

--regolith

apon
Bummer
05/29/03 01:24:57 PM
by: apon - mood: Default

Thought I was going to be getting my new TV tomorrow, but the freight company is all booked up, so I won't be getting it until Monday. :-(

-apon

[1390 views]