Copyright | (c) Kai Lindholm, 2014 |
---|---|
License | MIT |
Maintainer | megantti@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
For more info on actions, see Network.RTorrent.Action.
- data PeerId = PeerId !TorrentId !String
- data PeerInfo = PeerInfo {
- peerClientVersion :: String
- peerIp :: String
- peerUpRate :: !Int
- peerDownRate :: !Int
- peerUpTotal :: !Int
- peerDownTotal :: !Int
- peerEncrypted :: !Bool
- peerCompletedPercent :: !Int
- peerPort :: !Int
- peerId :: PeerId
- type PeerAction = Action PeerId
- getPeerPartial :: PeerId -> PeerAction (PeerId -> PeerInfo)
- allPeers :: (PeerId -> PeerAction a) -> TorrentId -> TorrentAction [PeerId :*: a]
- getTorrentPeers :: TorrentId -> TorrentAction [PeerInfo]
- banPeer :: PeerId -> PeerAction Int
- disconnectPeer :: PeerId -> PeerAction Int
- getPeerHash :: PeerId -> PeerAction String
- getPeerIp :: PeerId -> PeerAction String
- getPeerClientVersion :: PeerId -> PeerAction String
- getPeerUpRate :: PeerId -> PeerAction Int
- getPeerDownRate :: PeerId -> PeerAction Int
- getPeerUpTotal :: PeerId -> PeerAction Int
- getPeerDownTotal :: PeerId -> PeerAction Int
- getPeerEncrypted :: PeerId -> PeerAction Bool
- getPeerCompletedPercent :: PeerId -> PeerAction Int
- getPeerPort :: PeerId -> PeerAction Int
Documentation
PeerInfo | |
|
type PeerAction = Action PeerId Source
getPeerPartial :: PeerId -> PeerAction (PeerId -> PeerInfo) Source
Get a partial peer. PeerId
can be gotten by running allPeers
.
allPeers :: (PeerId -> PeerAction a) -> TorrentId -> TorrentAction [PeerId :*: a] Source
Run the peer action on all peers that a torrent has.
Control peers
banPeer :: PeerId -> PeerAction Int Source
disconnectPeer :: PeerId -> PeerAction Int Source
Functions for single variables
getPeerHash :: PeerId -> PeerAction String Source
getPeerIp :: PeerId -> PeerAction String Source
getPeerUpRate :: PeerId -> PeerAction Int Source
getPeerDownRate :: PeerId -> PeerAction Int Source
getPeerUpTotal :: PeerId -> PeerAction Int Source
getPeerPort :: PeerId -> PeerAction Int Source