Windows, P2P, network freezes and the TCP `half-open’ state

Have you ever tried to run a very network-intensive P2P application on Windows XP SP2 or higher? If so, you may have encountered very strange behaviour with the Windows TCP/IP network stack. Specifically, you won’t be able to open any new TCP/IP connections, so web-browsing, email checking, SSH, etc will all be basically [...]

OpenBSD’s omalloc: Bug and buffer overflow detection

For quite a long time now, OpenBSD has, among numerous exploit mitigation techniques, had a very strict mmap()-based malloc() implementation. Recently re-written by Otto Moerbeek, it is even harsher now. I find that this feature makes OpenBSD one of the best platforms to develop C programs on. If you have a [...]

Unworkable 0.4 released

I have just tagged, packaged and announced version 0.4 of my BitTorrent implementation, Unworkable.
Here are the release notes:

Implemented sending peer keep-alives.
Trace log now contains timestamps.
Make us more tolerant of intermittent tracker failures.
Added support for Arch Linux.
Fixed an off-by-four bug which could cause segfaults on some platforms.
Fix zero padding in peer id generation.
Overall code reduction and [...]

BitTorrent Strategies: The Beginning

To follow up on my last post on the bittorrent end-game, I’m going to write about a strategy to bootstrap a torrent download. I am talking here about the case where you start a download with no existing data, in other words, from scratch. As I described in one of my earlier articles [...]

BitTorrent Strategies: The End Game

Downloads in BitTorrent take place according to a number of strategies, which map to stages. Initiating a torrent download has one strategy, normal operation has another strategy, and finally pulling down the last remaining pieces has yet another strategy.
The End Game is the name for the final download strategy – there is a [...]