diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-13 14:05:00 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-13 14:05:00 +0400 |
commit | 2027b99f7a12986c6c0cb9d3205e0893fba17c9a (patch) | |
tree | 042e0471bcfc4a125ce479dff17df4fc89aee008 /examples/Client.hs | |
parent | 8ddb71a490ec862d1df626b7eb9300d9ddb782f3 (diff) |
Update client example
Diffstat (limited to 'examples/Client.hs')
-rw-r--r-- | examples/Client.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/Client.hs b/examples/Client.hs new file mode 100644 index 00000000..efafba72 --- /dev/null +++ b/examples/Client.hs | |||
@@ -0,0 +1,17 @@ | |||
1 | module Main (main) where | ||
2 | |||
3 | import Control.Concurrent | ||
4 | import Data.Default | ||
5 | import Data.Torrent | ||
6 | import Network.BitTorrent.Client | ||
7 | import System.Environment | ||
8 | import Text.PrettyPrint.Class | ||
9 | |||
10 | |||
11 | main :: IO () | ||
12 | main = do | ||
13 | [path] <- getArgs | ||
14 | torrent <- fromFile path | ||
15 | client <- newClient def | ||
16 | addTorrent torrent client | ||
17 | return () \ No newline at end of file | ||