diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-11-04 03:25:21 -0500 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-11-04 03:25:21 -0500 |
commit | 5f5aa818f8484570349e75a061d7b37cc9fe826a (patch) | |
tree | 9a574cc572d2caa4af9571a4776d207250e93add /src/Network | |
parent | df787ee7eea3d0d6e0defdc4a7cbe646ca062feb (diff) |
Preparation to move DPut to a separate project.
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/Address.hs | 1 | ||||
-rw-r--r-- | src/Network/BitTorrent/MainlineDHT.hs | 1 | ||||
-rw-r--r-- | src/Network/Kademlia/Bootstrap.hs | 1 | ||||
-rw-r--r-- | src/Network/Lossless.hs | 1 | ||||
-rw-r--r-- | src/Network/QueryResponse.hs | 1 | ||||
-rw-r--r-- | src/Network/StreamServer.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/AggregateSession.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/ContactInfo.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Crypto/Transport.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/DHT/Handlers.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Handshake.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Handlers.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Transport.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/Session.hs | 1 | ||||
-rw-r--r-- | src/Network/UPNP.hs | 1 |
17 files changed, 17 insertions, 0 deletions
diff --git a/src/Network/Address.hs b/src/Network/Address.hs index 3adfdc91..246463c0 100644 --- a/src/Network/Address.hs +++ b/src/Network/Address.hs | |||
@@ -130,6 +130,7 @@ import System.Locale (defaultTimeLocale) | |||
130 | #endif | 130 | #endif |
131 | import System.Entropy | 131 | import System.Entropy |
132 | import DPut | 132 | import DPut |
133 | import DebugTag | ||
133 | 134 | ||
134 | -- import Paths_bittorrent (version) | 135 | -- import Paths_bittorrent (version) |
135 | 136 | ||
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs index c5b99234..573efcba 100644 --- a/src/Network/BitTorrent/MainlineDHT.hs +++ b/src/Network/BitTorrent/MainlineDHT.hs | |||
@@ -83,6 +83,7 @@ import Text.Read | |||
83 | import System.Global6 | 83 | import System.Global6 |
84 | import Control.TriadCommittee | 84 | import Control.TriadCommittee |
85 | import DPut | 85 | import DPut |
86 | import DebugTag | ||
86 | 87 | ||
87 | newtype NodeId = NodeId ByteString | 88 | newtype NodeId = NodeId ByteString |
88 | deriving (Eq,Ord,ByteArrayAccess, Bits, Hashable) | 89 | deriving (Eq,Ord,ByteArrayAccess, Bits, Hashable) |
diff --git a/src/Network/Kademlia/Bootstrap.hs b/src/Network/Kademlia/Bootstrap.hs index 1a70a9c5..aad8a81e 100644 --- a/src/Network/Kademlia/Bootstrap.hs +++ b/src/Network/Kademlia/Bootstrap.hs | |||
@@ -32,6 +32,7 @@ import Data.Ord | |||
32 | import System.Entropy | 32 | import System.Entropy |
33 | import System.Timeout | 33 | import System.Timeout |
34 | import DPut | 34 | import DPut |
35 | import DebugTag | ||
35 | 36 | ||
36 | import qualified Data.Wrapper.PSQInt as Int | 37 | import qualified Data.Wrapper.PSQInt as Int |
37 | ;import Data.Wrapper.PSQInt (pattern (:->)) | 38 | ;import Data.Wrapper.PSQInt (pattern (:->)) |
diff --git a/src/Network/Lossless.hs b/src/Network/Lossless.hs index 4d5521fd..861792ab 100644 --- a/src/Network/Lossless.hs +++ b/src/Network/Lossless.hs | |||
@@ -18,6 +18,7 @@ import System.IO.Error | |||
18 | 18 | ||
19 | import Data.PacketBuffer as PB | 19 | import Data.PacketBuffer as PB |
20 | import DPut | 20 | import DPut |
21 | import DebugTag | ||
21 | import Network.QueryResponse | 22 | import Network.QueryResponse |
22 | 23 | ||
23 | #ifdef THREAD_DEBUG | 24 | #ifdef THREAD_DEBUG |
diff --git a/src/Network/QueryResponse.hs b/src/Network/QueryResponse.hs index fdfbdbae..4e110ec3 100644 --- a/src/Network/QueryResponse.hs +++ b/src/Network/QueryResponse.hs | |||
@@ -38,6 +38,7 @@ import System.IO | |||
38 | import System.IO.Error | 38 | import System.IO.Error |
39 | import System.Timeout | 39 | import System.Timeout |
40 | import DPut | 40 | import DPut |
41 | import DebugTag | ||
41 | 42 | ||
42 | -- | Three methods are required to implement a datagram based query\/response protocol. | 43 | -- | Three methods are required to implement a datagram based query\/response protocol. |
43 | data TransportA err addr x y = Transport | 44 | data TransportA err addr x y = Transport |
diff --git a/src/Network/StreamServer.hs b/src/Network/StreamServer.hs index 2734f0cd..afa35675 100644 --- a/src/Network/StreamServer.hs +++ b/src/Network/StreamServer.hs | |||
@@ -44,6 +44,7 @@ import Control.Concurrent.MVar (newMVar) | |||
44 | 44 | ||
45 | import Network.SocketLike | 45 | import Network.SocketLike |
46 | import DPut | 46 | import DPut |
47 | import DebugTag | ||
47 | 48 | ||
48 | data ServerHandle = ServerHandle Socket (Weak ThreadId) | 49 | data ServerHandle = ServerHandle Socket (Weak ThreadId) |
49 | 50 | ||
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 88228c50..ddb22d50 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -61,6 +61,7 @@ import OnionRouter | |||
61 | import Network.Tox.ContactInfo | 61 | import Network.Tox.ContactInfo |
62 | import Text.XXD | 62 | import Text.XXD |
63 | import DPut | 63 | import DPut |
64 | import DebugTag | ||
64 | import Network.Tox.Avahi | 65 | import Network.Tox.Avahi |
65 | import Network.Tox.Session | 66 | import Network.Tox.Session |
66 | import Network.SessionTransports | 67 | import Network.SessionTransports |
diff --git a/src/Network/Tox/AggregateSession.hs b/src/Network/Tox/AggregateSession.hs index 2323673a..b248c96f 100644 --- a/src/Network/Tox/AggregateSession.hs +++ b/src/Network/Tox/AggregateSession.hs | |||
@@ -41,6 +41,7 @@ import Connection (Status (..)) | |||
41 | import Crypto.Tox (PublicKey, toPublic) | 41 | import Crypto.Tox (PublicKey, toPublic) |
42 | import Data.Wrapper.PSQInt as PSQ | 42 | import Data.Wrapper.PSQInt as PSQ |
43 | import DPut | 43 | import DPut |
44 | import DebugTag | ||
44 | import Network.QueryResponse | 45 | import Network.QueryResponse |
45 | import Network.Tox.Crypto.Transport (CryptoMessage (..), pattern KillPacket, | 46 | import Network.Tox.Crypto.Transport (CryptoMessage (..), pattern KillPacket, |
46 | pattern ONLINE, pattern PING, | 47 | pattern ONLINE, pattern PING, |
diff --git a/src/Network/Tox/ContactInfo.hs b/src/Network/Tox/ContactInfo.hs index 387a6e47..e7cb48c1 100644 --- a/src/Network/Tox/ContactInfo.hs +++ b/src/Network/Tox/ContactInfo.hs | |||
@@ -15,6 +15,7 @@ import Network.Tox.DHT.Transport as DHT | |||
15 | import Network.Tox.NodeId (id2key) | 15 | import Network.Tox.NodeId (id2key) |
16 | import Network.Tox.Onion.Transport as Onion | 16 | import Network.Tox.Onion.Transport as Onion |
17 | import DPut | 17 | import DPut |
18 | import DebugTag | ||
18 | 19 | ||
19 | newtype ContactInfo extra = ContactInfo | 20 | newtype ContactInfo extra = ContactInfo |
20 | -- | Map our toxid public key to an Account record. | 21 | -- | Map our toxid public key to an Account record. |
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index bf01e1b5..94dde8e3 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -51,6 +51,7 @@ import qualified Data.IntMap.Strict as IntMap | |||
51 | import Control.Concurrent.Supply | 51 | import Control.Concurrent.Supply |
52 | import Data.InOrOut | 52 | import Data.InOrOut |
53 | import DPut | 53 | import DPut |
54 | import DebugTag | ||
54 | import Text.Printf | 55 | import Text.Printf |
55 | import Data.Bool | 56 | import Data.Bool |
56 | import Network.Tox.Handshake | 57 | import Network.Tox.Handshake |
diff --git a/src/Network/Tox/Crypto/Transport.hs b/src/Network/Tox/Crypto/Transport.hs index 84929e63..555164f2 100644 --- a/src/Network/Tox/Crypto/Transport.hs +++ b/src/Network/Tox/Crypto/Transport.hs | |||
@@ -87,6 +87,7 @@ import Data.Text.Encoding as T | |||
87 | import Data.Serialize as S | 87 | import Data.Serialize as S |
88 | import Control.Arrow | 88 | import Control.Arrow |
89 | import DPut | 89 | import DPut |
90 | import DebugTag | ||
90 | import Data.PacketBuffer as PB | 91 | import Data.PacketBuffer as PB |
91 | 92 | ||
92 | showCryptoMsg :: Word32 -> CryptoMessage -> [Char] | 93 | showCryptoMsg :: Word32 -> CryptoMessage -> [Char] |
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs index b1db9044..d7f05dbc 100644 --- a/src/Network/Tox/DHT/Handlers.hs +++ b/src/Network/Tox/DHT/Handlers.hs | |||
@@ -40,6 +40,7 @@ import Data.Maybe | |||
40 | import Data.Serialize (Serialize) | 40 | import Data.Serialize (Serialize) |
41 | import Data.Word | 41 | import Data.Word |
42 | import DPut | 42 | import DPut |
43 | import DebugTag | ||
43 | 44 | ||
44 | data TransactionId = TransactionId | 45 | data TransactionId = TransactionId |
45 | { transactionKey :: Nonce8 -- ^ Used to lookup pending query. | 46 | { transactionKey :: Nonce8 -- ^ Used to lookup pending query. |
diff --git a/src/Network/Tox/Handshake.hs b/src/Network/Tox/Handshake.hs index 0ca99fe2..6df9edab 100644 --- a/src/Network/Tox/Handshake.hs +++ b/src/Network/Tox/Handshake.hs | |||
@@ -23,6 +23,7 @@ import Control.Concurrent | |||
23 | import GHC.Conc (labelThread) | 23 | import GHC.Conc (labelThread) |
24 | #endif | 24 | #endif |
25 | import DPut | 25 | import DPut |
26 | import DebugTag | ||
26 | 27 | ||
27 | 28 | ||
28 | anyRight :: Monad m => a -> [t] -> (t -> m (Either b b1)) -> m (Either a b1) | 29 | anyRight :: Monad m => a -> [t] -> (t -> m (Either b b1)) -> m (Either a b1) |
diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs index 80a6ae3a..0d8a9151 100644 --- a/src/Network/Tox/Onion/Handlers.hs +++ b/src/Network/Tox/Onion/Handlers.hs | |||
@@ -38,6 +38,7 @@ import Data.IP | |||
38 | import Data.Maybe | 38 | import Data.Maybe |
39 | import Data.Functor.Identity | 39 | import Data.Functor.Identity |
40 | import DPut | 40 | import DPut |
41 | import DebugTag | ||
41 | 42 | ||
42 | type Client r = QR.Client String PacketKind TransactionId (OnionDestination r) Message | 43 | type Client r = QR.Client String PacketKind TransactionId (OnionDestination r) Message |
43 | type Message = OnionMessage Identity | 44 | type Message = OnionMessage Identity |
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs index 7ed9702a..10bd5a44 100644 --- a/src/Network/Tox/Onion/Transport.hs +++ b/src/Network/Tox/Onion/Transport.hs | |||
@@ -82,6 +82,7 @@ import Network.Socket | |||
82 | import qualified Text.ParserCombinators.ReadP as RP | 82 | import qualified Text.ParserCombinators.ReadP as RP |
83 | import Data.Hashable | 83 | import Data.Hashable |
84 | import DPut | 84 | import DPut |
85 | import DebugTag | ||
85 | 86 | ||
86 | type HandleLo a = Maybe (Either String (ByteString, SockAddr)) -> IO a | 87 | type HandleLo a = Maybe (Either String (ByteString, SockAddr)) -> IO a |
87 | 88 | ||
diff --git a/src/Network/Tox/Session.hs b/src/Network/Tox/Session.hs index 968b3503..18e17fb6 100644 --- a/src/Network/Tox/Session.hs +++ b/src/Network/Tox/Session.hs | |||
@@ -20,6 +20,7 @@ import Crypto.Tox | |||
20 | import Data.PacketBuffer (PacketInboundEvent (..)) | 20 | import Data.PacketBuffer (PacketInboundEvent (..)) |
21 | import Data.Tox.Message | 21 | import Data.Tox.Message |
22 | import DPut | 22 | import DPut |
23 | import DebugTag | ||
23 | import Network.Lossless | 24 | import Network.Lossless |
24 | import Network.QueryResponse | 25 | import Network.QueryResponse |
25 | import Network.SessionTransports | 26 | import Network.SessionTransports |
diff --git a/src/Network/UPNP.hs b/src/Network/UPNP.hs index e89471c2..01d222bf 100644 --- a/src/Network/UPNP.hs +++ b/src/Network/UPNP.hs | |||
@@ -6,6 +6,7 @@ import Network.Socket | |||
6 | import System.Directory | 6 | import System.Directory |
7 | import System.Process as Process | 7 | import System.Process as Process |
8 | import DPut | 8 | import DPut |
9 | import DebugTag | ||
9 | 10 | ||
10 | protocols :: SocketType -> [String] | 11 | protocols :: SocketType -> [String] |
11 | protocols Stream = ["tcp"] | 12 | protocols Stream = ["tcp"] |