From 4edd28dacebe0c57a01dce5985bff0623895e6bb Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org> Date: Tue, 10 Feb 2015 12:06:24 +0530 Subject: [PATCH] WIP: tracker interactions --- src/Tracker.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/Tracker.hs diff --git a/src/Tracker.hs b/src/Tracker.hs new file mode 100644 index 0000000..6db0c36 --- /dev/null +++ b/src/Tracker.hs @@ -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 + -- 2.45.2