Quantcast
Channel: Pense-moi » p2p
Browsing latest articles
Browse All 7 View Live

Implementing two-way traffic control in F#

This post describes how to implement two-way (TCP for instance) traffic control in F# by modifying slightly a Trolltech article available at http://doc.trolltech.com/qq/qq17-ratecontrol.html. Remote...

View Article



Rate meter in F#

The following code allows us to measure (and keep track of) the exchange rate (whether upload or download), and the time needed to exchange n additional bytes (assuming the rate is stable). open System...

View Article

Implementing two-way traffic control in F# – bucket approach

We had previously given a way to implement two-way traffic control on a strict basis using a function which looped constantly to see if any data was available o read/write, and which processed it...

View Article

BitTorrent in F# – Bencoded values

Bencoding values for the BitTorrent protocol is explained in a Wikipedia article on Bencoding or in the more general BitTorrent protocol page. Briefly, there are four types : byte strings : [string...

View Article

BitTorrent in F#- Metainfo file handling

To exchange files, a BitTorrent client needs some information about the exchanged file(s). This information is contained within a file named the “metainfo” file. More details are explaind in the...

View Article


BitTorrent in F# – I/O operations

Once the Metainfo file can be read, the client ought to know which files compose the transfer, and how to connect to sources for the transfer. In this post, we will define the elements we need to...

View Article

BitTorrent in F# – Bitfield

The bitfield tracks which pieces of the transfer are already downloaded, and which aren’t. We therefore only need a structure which can track two states per value, which is why we use a bitarray...

View Article
Browsing latest articles
Browse All 7 View Live




Latest Images