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 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/Network/BitTorrent/Client') 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 -- cgit v1.2.3