From eaf426da786acf925a1786938c5ae2b1c9230a07 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 4 Feb 2014 07:02:47 +0400 Subject: Remove orphan module --- src/Network/BitTorrent/Client/Swarm.hs | 15 +++++---- src/Network/BitTorrent/Tracker/Session.hs | 56 ------------------------------- 2 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 src/Network/BitTorrent/Tracker/Session.hs (limited to 'src') diff --git a/src/Network/BitTorrent/Client/Swarm.hs b/src/Network/BitTorrent/Client/Swarm.hs index 7fdd1f2f..bd48f8a4 100644 --- a/src/Network/BitTorrent/Client/Swarm.hs +++ b/src/Network/BitTorrent/Client/Swarm.hs @@ -5,6 +5,7 @@ module Network.BitTorrent.Client.Swarm ) where import Data.Default +import Data.Maybe import Network import Data.Torrent @@ -18,18 +19,14 @@ data Swarm = Swarm { swarmTopic :: InfoHash , thisPeerId :: PeerId , listenerPort :: PortNumber - , trackerConn :: Tracker --- , infoDict :: } newLeecher :: PeerId -> PortNumber -> Torrent -> IO Swarm newLeecher pid port Torrent {..} = do - tracker <- connect undefined return Swarm { swarmTopic = idInfoHash tInfoDict , thisPeerId = pid , listenerPort = port - , trackerConn = tracker } getAnnounceQuery :: Swarm -> AnnounceQuery @@ -45,5 +42,11 @@ getAnnounceQuery Swarm {..} = AnnounceQuery askPeers :: Swarm -> IO [PeerAddr IP] askPeers s @ Swarm {..} = do - AnnounceInfo {..} <- RPC.announce (getAnnounceQuery s) trackerConn - return (getPeerList respPeers) +-- AnnounceInfo {..} <- RPC.announce (getAnnounceQuery s) trackerConn + return [] -- (getPeerList respPeers) + +--reannounce :: HTracker -> IO () +--reannounce = undefined + +--forceReannounce :: HTracker -> IO () +--forceReannounce = undefined diff --git a/src/Network/BitTorrent/Tracker/Session.hs b/src/Network/BitTorrent/Tracker/Session.hs deleted file mode 100644 index 3cfc4b52..00000000 --- a/src/Network/BitTorrent/Tracker/Session.hs +++ /dev/null @@ -1,56 +0,0 @@ -module Network.BitTorrent.Tracker.Session - ( - ) where - -import Data.Torrent.Progress -import Data.Torrent.InfoHash -import Network.BitTorrent.Core.PeerAddr -import Network.BitTorrent.Tracker.Message - -data PeerInfo = PeerInfo - { peerId :: PeerId - , peerPort :: PortNumber - , peerIP :: Maybe HostAddress - } - -data Session = Session - { sesInfoHash :: !InfoHash - , sesPeerInfo :: !PeerInfo - } - -data SAnnounceQuery = SAnnounceQuery - { sreqProgress :: Progress - , sreqNumWant :: Maybe Int - , sreqEvent :: Maybe Event - } - -type SAnnounceInfo = [PeerAddr] - -f :: Session -> SAnnounceQuery -> AnnounceQuery -f Session {..} SAnnounceQuery {..} = AnnounceQuery - { reqInfoHash = sesInfoHash - , reqPeerInfo = sesPeerInfo - , reqProgress = sreqProgress - , reqNumWant = undefined - , reqEvent = sreqEvent - } - -data Settings = Settings - -data Manager = Manager - { - } - - -g :: Session -> AnnounceInfo -> SAnnounceInfo -g Session {..} SAnnounceInfo {..} = undefined - - -reannounce :: HTracker -> IO () -reannounce = undefined - -forceReannounce :: HTracker -> IO () -forceReannounce = undefined - -scrape :: HTracker -> IO () -scrape = undefined -- cgit v1.2.3