]> git.rkrishnan.org Git - functorrent.git/commitdiff
WIP: tracker interactions
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 10 Feb 2015 06:36:24 +0000 (12:06 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 10 Feb 2015 06:36:24 +0000 (12:06 +0530)
src/Tracker.hs [new file with mode: 0644]

diff --git a/src/Tracker.hs b/src/Tracker.hs
new file mode 100644 (file)
index 0000000..6db0c36
--- /dev/null
@@ -0,0 +1,16 @@
+module Tracker where
+
+import qualified Bencode as Benc
+import Data.Conduit
+import Network.HTTP
+
+type Url = String
+
+requestUrl :: String
+
+
+connect :: Url -> String -> IO (Benc.BVal)
+connect url infoHash = case (parseUrl url) of
+                        Nothing -> putStrLn "invalid tracker URL"
+                        Just req -> let 
+