diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-03-03 03:09:34 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-03-03 03:09:34 +0400 |
commit | 863f7a236b86f562309748273f3087035a999ee7 (patch) | |
tree | b0ccfad4cc73ec0033674094a12e53203b05c0c9 | |
parent | 9bd27cd068591446ff9026420654de14d58e0841 (diff) |
Rename Wire.hs to Connection.hs
-rw-r--r-- | bittorrent.cabal | 6 | ||||
-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.hs | 3 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Session.hs | 4 | ||||
-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 #-} |
21 | module Network.BitTorrent.Exchange.Wire | 21 | module Network.BitTorrent.Exchange.Connection |
22 | ( -- * Wire | 22 | ( -- * Wire |
23 | Connected | 23 | Connected |
24 | , Wire | 24 | , Wire |
@@ -125,8 +125,8 @@ import System.Timeout | |||
125 | import Data.Torrent.Bitfield as BF | 125 | import Data.Torrent.Bitfield as BF |
126 | import Data.Torrent.InfoHash | 126 | import Data.Torrent.InfoHash |
127 | import Network.BitTorrent.Core | 127 | import Network.BitTorrent.Core |
128 | import Network.BitTorrent.Exchange.Connection.Status | ||
128 | import Network.BitTorrent.Exchange.Message as Msg | 129 | import Network.BitTorrent.Exchange.Message as Msg |
129 | import 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 #-} |
12 | module Network.BitTorrent.Exchange.Wire.Status | 12 | module 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 | ||
15 | import Data.Torrent.InfoHash | 15 | import Data.Torrent.InfoHash |
16 | import Network.BitTorrent.Core | 16 | import Network.BitTorrent.Core |
17 | import Network.BitTorrent.Exchange.Connection hiding (Options) | ||
17 | import Network.BitTorrent.Exchange.Session | 18 | import Network.BitTorrent.Exchange.Session |
18 | import Network.BitTorrent.Exchange.Wire hiding (Options) | 19 | |
19 | 20 | ||
20 | data Options = Options | 21 | data 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 | |||
46 | import qualified Data.Torrent.Piece as Torrent (Piece ()) | 46 | import qualified Data.Torrent.Piece as Torrent (Piece ()) |
47 | import Network.BitTorrent.Core | 47 | import Network.BitTorrent.Core |
48 | import Network.BitTorrent.Exchange.Block as Block | 48 | import Network.BitTorrent.Exchange.Block as Block |
49 | import Network.BitTorrent.Exchange.Connection | ||
50 | import Network.BitTorrent.Exchange.Connection.Status | ||
49 | import Network.BitTorrent.Exchange.Message as Message | 51 | import Network.BitTorrent.Exchange.Message as Message |
50 | import Network.BitTorrent.Exchange.Session.Metadata as Metadata | 52 | import Network.BitTorrent.Exchange.Session.Metadata as Metadata |
51 | import Network.BitTorrent.Exchange.Session.Status as SS | 53 | import Network.BitTorrent.Exchange.Session.Status as SS |
52 | import Network.BitTorrent.Exchange.Wire | ||
53 | import Network.BitTorrent.Exchange.Wire.Status | ||
54 | import System.Torrent.Storage | 54 | import 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 #-} |
3 | module Network.BitTorrent.Exchange.WireSpec (spec) where | 3 | module Network.BitTorrent.Exchange.ConnectionSpec (spec) where |
4 | import Control.Applicative | 4 | import Control.Applicative |
5 | import Control.Monad.Trans | 5 | import Control.Monad.Trans |
6 | import Data.Default | 6 | import Data.Default |
@@ -10,8 +10,8 @@ import Test.QuickCheck | |||
10 | import Data.Torrent | 10 | import Data.Torrent |
11 | import Data.Torrent.InfoHash | 11 | import Data.Torrent.InfoHash |
12 | import Network.BitTorrent.Core | 12 | import Network.BitTorrent.Core |
13 | import Network.BitTorrent.Exchange.Connection | ||
13 | import Network.BitTorrent.Exchange.Message | 14 | import Network.BitTorrent.Exchange.Message |
14 | import Network.BitTorrent.Exchange.Wire | ||
15 | 15 | ||
16 | import Config | 16 | import Config |
17 | import Network.BitTorrent.Exchange.MessageSpec () | 17 | import Network.BitTorrent.Exchange.MessageSpec () |