bittorrent-0.0.0.2: Bittorrent protocol implementation.

Portabilityportable
Stabilityexperimental
Maintainerpxqr.sta@gmail.com
Safe HaskellSafe-Inferred

Data.Torrent.Client

Contents

Description

ClientInfo is used to identify the client implementation and version which also contained in Peer. For exsample first 6 bytes of peer id of this this library are -HS0100- while for mainline we have M4-3-6--. We could extract this info and print in human-friendly form: this is useful for debugging and logging.

For more information see: http://bittorrent.org/beps/bep_0020.html

NOTE: Do _not_ use this information to control client capabilities (such as supported enchancements), this should be done using Extension!

Synopsis

Client implementation

ppClientImpl :: ClientImpl -> DocSource

Format client implementation info in human-readable form.

Client version

newtype ClientVersion Source

Version of client software, normally extracted from peer id.

Constructors

ClientVersion 

ppClientVersion :: ClientVersion -> DocSource

Format client implementation version in human-readable form.

Client information

data ClientInfo Source

The all sensible infomation that can be obtained from a peer identifier or torrent createdBy field.

Constructors

ClientInfo 

Instances

Eq ClientInfo 
Ord ClientInfo 
Show ClientInfo 
Default ClientInfo

Unrecognized client implementation.

ppClientInfo :: ClientInfo -> DocSource

Format client info in human-readable form.

libClientInfo :: ClientInfoSource

Client info of this (the bittorrent library) package. Normally, applications should introduce its own idenitifiers, otherwise they can use libClientInfo value.