diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC/HTTP.hs | 11 | ||||
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC/Message.hs | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs index 81208590..2006ae70 100644 --- a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs +++ b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs | |||
@@ -51,8 +51,15 @@ data Connection = Connection | |||
51 | putConnection :: Connection -> IO () | 51 | putConnection :: Connection -> IO () |
52 | putConnection = undefined | 52 | putConnection = undefined |
53 | 53 | ||
54 | connect :: URI -> IO Connection | 54 | -- TODO share manager between several threads |
55 | connect = undefined | 55 | connect :: URI -> ResourceT IO Connection |
56 | connect uri = do | ||
57 | (_, m) <- allocate (newManager def) closeManager | ||
58 | return Connection | ||
59 | { announceURI = uri | ||
60 | , manager = m | ||
61 | , connProxy = Nothing | ||
62 | } | ||
56 | 63 | ||
57 | setSimpleQuery :: SimpleQuery -> Request m -> Request m | 64 | setSimpleQuery :: SimpleQuery -> Request m -> Request m |
58 | setSimpleQuery q r = r | 65 | setSimpleQuery q r = r |
diff --git a/src/Network/BitTorrent/Tracker/RPC/Message.hs b/src/Network/BitTorrent/Tracker/RPC/Message.hs index e91d223e..26868ead 100644 --- a/src/Network/BitTorrent/Tracker/RPC/Message.hs +++ b/src/Network/BitTorrent/Tracker/RPC/Message.hs | |||
@@ -475,9 +475,6 @@ parseFailureMessage e = BS.concat $ case e of | |||
475 | parseFailureStatus :: ParamParseFailure -> Status | 475 | parseFailureStatus :: ParamParseFailure -> Status |
476 | parseFailureStatus = mkStatus <$> parseFailureCode <*> parseFailureMessage | 476 | parseFailureStatus = mkStatus <$> parseFailureCode <*> parseFailureMessage |
477 | 477 | ||
478 | --type AnnounceResponse = Either Status AnnounceInfo -- TODO | ||
479 | --type TrackerResponse = () -- TODO | ||
480 | |||
481 | {----------------------------------------------------------------------- | 478 | {----------------------------------------------------------------------- |
482 | Scrape message | 479 | Scrape message |
483 | -----------------------------------------------------------------------} | 480 | -----------------------------------------------------------------------} |