blob: 3a347ab6d6240489b7276551e5b59d06df40b12d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
module Main (main) where
import Data.Bitfield
import Network.BitTorrent
import System.Environment
main :: IO ()
main = do
[path] <- getArgs
Right torrent <- fromFile path
client <- newClient []
swarm <- newLeacher client torrent
discover swarm $ \se -> do
peers <- getPeerList se
print peers
print "Bye-bye!"
|