summaryrefslogtreecommitdiff
path: root/examples/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Main.hs')
-rw-r--r--examples/Main.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/Main.hs b/examples/Main.hs
index b8e3c11f..5128b290 100644
--- a/examples/Main.hs
+++ b/examples/Main.hs
@@ -1,6 +1,8 @@
1module Main (main) where 1module Main (main) where
2 2
3import Control.Concurrent
3import Network.BitTorrent 4import Network.BitTorrent
5import Network.BitTorrent.Sessions
4import System.Environment 6import System.Environment
5 7
6main :: IO () 8main :: IO ()
@@ -8,6 +10,9 @@ main = do
8 [path] <- getArgs 10 [path] <- getArgs
9 torrent <- fromFile path 11 torrent <- fromFile path
10 print (contentLayout "./" (tInfo torrent)) 12 print (contentLayout "./" (tInfo torrent))
13 let loc = TorrentLoc path "/tmp"
11 14
12 withDefaultClient 3000 3001 $ \ client -> 15 withDefaultClient 51413 3000 $ \ client -> do
13 addTorrent client $ TorrentLoc path "/tmp" 16 openSwarmSession client loc
17 threadDelay 1000000000000
18 return ()