summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bittorrent.cabal6
-rw-r--r--src/Network/BitTorrent/Exchange/Connection.hs (renamed from src/Network/BitTorrent/Exchange/Wire.hs)4
-rw-r--r--src/Network/BitTorrent/Exchange/Connection/Status.hs (renamed from src/Network/BitTorrent/Exchange/Wire/Status.hs)2
-rw-r--r--src/Network/BitTorrent/Exchange/Manager.hs3
-rw-r--r--src/Network/BitTorrent/Exchange/Session.hs4
-rw-r--r--tests/Network/BitTorrent/Exchange/ConnectionSpec.hs (renamed from tests/Network/BitTorrent/Exchange/WireSpec.hs)4
6 files changed, 12 insertions, 11 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index 23f2a1e8..7d2b9594 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -71,14 +71,14 @@ library
71 Network.BitTorrent.Exchange 71 Network.BitTorrent.Exchange
72 Network.BitTorrent.Exchange.Assembler 72 Network.BitTorrent.Exchange.Assembler
73 Network.BitTorrent.Exchange.Block 73 Network.BitTorrent.Exchange.Block
74 Network.BitTorrent.Exchange.Connection
75 Network.BitTorrent.Exchange.Connection.Status
74 Network.BitTorrent.Exchange.Manager 76 Network.BitTorrent.Exchange.Manager
75 Network.BitTorrent.Exchange.Message 77 Network.BitTorrent.Exchange.Message
76 Network.BitTorrent.Exchange.Selection 78 Network.BitTorrent.Exchange.Selection
77 Network.BitTorrent.Exchange.Session 79 Network.BitTorrent.Exchange.Session
78 Network.BitTorrent.Exchange.Session.Metadata 80 Network.BitTorrent.Exchange.Session.Metadata
79 Network.BitTorrent.Exchange.Session.Status 81 Network.BitTorrent.Exchange.Session.Status
80 Network.BitTorrent.Exchange.Wire
81 Network.BitTorrent.Exchange.Wire.Status
82 Network.BitTorrent.Tracker 82 Network.BitTorrent.Tracker
83 Network.BitTorrent.Tracker.Cache 83 Network.BitTorrent.Tracker.Cache
84 Network.BitTorrent.Tracker.List 84 Network.BitTorrent.Tracker.List
@@ -209,10 +209,10 @@ test-suite spec
209 Network.BitTorrent.Tracker.RPC.HTTPSpec 209 Network.BitTorrent.Tracker.RPC.HTTPSpec
210 Network.BitTorrent.Tracker.RPC.UDPSpec 210 Network.BitTorrent.Tracker.RPC.UDPSpec
211 Network.BitTorrent.Tracker.SessionSpec 211 Network.BitTorrent.Tracker.SessionSpec
212 Network.BitTorrent.Exchange.ConnectionSpec
212 Network.BitTorrent.Exchange.MessageSpec 213 Network.BitTorrent.Exchange.MessageSpec
213 Network.BitTorrent.Exchange.SessionSpec 214 Network.BitTorrent.Exchange.SessionSpec
214 Network.BitTorrent.Exchange.Session.MetadataSpec 215 Network.BitTorrent.Exchange.Session.MetadataSpec
215 Network.BitTorrent.Exchange.WireSpec
216 System.Torrent.StorageSpec 216 System.Torrent.StorageSpec
217 System.Torrent.FileMapSpec 217 System.Torrent.FileMapSpec
218 build-depends: base == 4.* 218 build-depends: base == 4.*
diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Connection.hs
index 53c9afb2..b23eb08b 100644
--- a/src/Network/BitTorrent/Exchange/Wire.hs
+++ b/src/Network/BitTorrent/Exchange/Connection.hs
@@ -18,7 +18,7 @@
18{-# LANGUAGE TemplateHaskell #-} 18{-# LANGUAGE TemplateHaskell #-}
19{-# LANGUAGE MultiParamTypeClasses #-} 19{-# LANGUAGE MultiParamTypeClasses #-}
20{-# LANGUAGE GeneralizedNewtypeDeriving #-} 20{-# LANGUAGE GeneralizedNewtypeDeriving #-}
21module Network.BitTorrent.Exchange.Wire 21module Network.BitTorrent.Exchange.Connection
22 ( -- * Wire 22 ( -- * Wire
23 Connected 23 Connected
24 , Wire 24 , Wire
@@ -125,8 +125,8 @@ import System.Timeout
125import Data.Torrent.Bitfield as BF 125import Data.Torrent.Bitfield as BF
126import Data.Torrent.InfoHash 126import Data.Torrent.InfoHash
127import Network.BitTorrent.Core 127import Network.BitTorrent.Core
128import Network.BitTorrent.Exchange.Connection.Status
128import Network.BitTorrent.Exchange.Message as Msg 129import Network.BitTorrent.Exchange.Message as Msg
129import Network.BitTorrent.Exchange.Wire.Status
130 130
131-- TODO handle port message? 131-- TODO handle port message?
132-- TODO handle limits? 132-- TODO handle limits?
diff --git a/src/Network/BitTorrent/Exchange/Wire/Status.hs b/src/Network/BitTorrent/Exchange/Connection/Status.hs
index d1b60f11..b4b10371 100644
--- a/src/Network/BitTorrent/Exchange/Wire/Status.hs
+++ b/src/Network/BitTorrent/Exchange/Connection/Status.hs
@@ -9,7 +9,7 @@
9-- sides. 9-- sides.
10-- 10--
11{-# LANGUAGE TemplateHaskell #-} 11{-# LANGUAGE TemplateHaskell #-}
12module Network.BitTorrent.Exchange.Wire.Status 12module Network.BitTorrent.Exchange.Connection.Status
13 ( -- * Peer status 13 ( -- * Peer status
14 PeerStatus(..) 14 PeerStatus(..)
15 , choking 15 , choking
diff --git a/src/Network/BitTorrent/Exchange/Manager.hs b/src/Network/BitTorrent/Exchange/Manager.hs
index 52a51a8d..f7f3cea7 100644
--- a/src/Network/BitTorrent/Exchange/Manager.hs
+++ b/src/Network/BitTorrent/Exchange/Manager.hs
@@ -14,8 +14,9 @@ import Network.Socket
14 14
15import Data.Torrent.InfoHash 15import Data.Torrent.InfoHash
16import Network.BitTorrent.Core 16import Network.BitTorrent.Core
17import Network.BitTorrent.Exchange.Connection hiding (Options)
17import Network.BitTorrent.Exchange.Session 18import Network.BitTorrent.Exchange.Session
18import Network.BitTorrent.Exchange.Wire hiding (Options) 19
19 20
20data Options = Options 21data Options = Options
21 { optBacklog :: Int 22 { optBacklog :: Int
diff --git a/src/Network/BitTorrent/Exchange/Session.hs b/src/Network/BitTorrent/Exchange/Session.hs
index f9e8433f..a0eaadaa 100644
--- a/src/Network/BitTorrent/Exchange/Session.hs
+++ b/src/Network/BitTorrent/Exchange/Session.hs
@@ -46,11 +46,11 @@ import Data.Torrent.Piece
46import qualified Data.Torrent.Piece as Torrent (Piece ()) 46import qualified Data.Torrent.Piece as Torrent (Piece ())
47import Network.BitTorrent.Core 47import Network.BitTorrent.Core
48import Network.BitTorrent.Exchange.Block as Block 48import Network.BitTorrent.Exchange.Block as Block
49import Network.BitTorrent.Exchange.Connection
50import Network.BitTorrent.Exchange.Connection.Status
49import Network.BitTorrent.Exchange.Message as Message 51import Network.BitTorrent.Exchange.Message as Message
50import Network.BitTorrent.Exchange.Session.Metadata as Metadata 52import Network.BitTorrent.Exchange.Session.Metadata as Metadata
51import Network.BitTorrent.Exchange.Session.Status as SS 53import Network.BitTorrent.Exchange.Session.Status as SS
52import Network.BitTorrent.Exchange.Wire
53import Network.BitTorrent.Exchange.Wire.Status
54import System.Torrent.Storage 54import System.Torrent.Storage
55 55
56{----------------------------------------------------------------------- 56{-----------------------------------------------------------------------
diff --git a/tests/Network/BitTorrent/Exchange/WireSpec.hs b/tests/Network/BitTorrent/Exchange/ConnectionSpec.hs
index 293e1bd6..c21f55ef 100644
--- a/tests/Network/BitTorrent/Exchange/WireSpec.hs
+++ b/tests/Network/BitTorrent/Exchange/ConnectionSpec.hs
@@ -1,6 +1,6 @@
1{-# LANGUAGE RecordWildCards #-} 1{-# LANGUAGE RecordWildCards #-}
2{-# OPTIONS_GHC -fno-warn-orphans #-} 2{-# OPTIONS_GHC -fno-warn-orphans #-}
3module Network.BitTorrent.Exchange.WireSpec (spec) where 3module Network.BitTorrent.Exchange.ConnectionSpec (spec) where
4import Control.Applicative 4import Control.Applicative
5import Control.Monad.Trans 5import Control.Monad.Trans
6import Data.Default 6import Data.Default
@@ -10,8 +10,8 @@ import Test.QuickCheck
10import Data.Torrent 10import Data.Torrent
11import Data.Torrent.InfoHash 11import Data.Torrent.InfoHash
12import Network.BitTorrent.Core 12import Network.BitTorrent.Core
13import Network.BitTorrent.Exchange.Connection
13import Network.BitTorrent.Exchange.Message 14import Network.BitTorrent.Exchange.Message
14import Network.BitTorrent.Exchange.Wire
15 15
16import Config 16import Config
17import Network.BitTorrent.Exchange.MessageSpec () 17import Network.BitTorrent.Exchange.MessageSpec ()