blob: 5128b290225df5a2bc3f4b208ab2f74fa2cb937d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module Main (main) where
import Control.Concurrent
import Network.BitTorrent
import Network.BitTorrent.Sessions
import System.Environment
main :: IO ()
main = do
[path] <- getArgs
torrent <- fromFile path
print (contentLayout "./" (tInfo torrent))
let loc = TorrentLoc path "/tmp"
withDefaultClient 51413 3000 $ \ client -> do
openSwarmSession client loc
threadDelay 1000000000000
return ()
|