summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2018-11-04 03:25:21 -0500
committerJames Crayne <jim.crayne@gmail.com>2018-11-04 03:25:21 -0500
commit5f5aa818f8484570349e75a061d7b37cc9fe826a (patch)
tree9a574cc572d2caa4af9571a4776d207250e93add /src/Network
parentdf787ee7eea3d0d6e0defdc4a7cbe646ca062feb (diff)
Preparation to move DPut to a separate project.
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/Address.hs1
-rw-r--r--src/Network/BitTorrent/MainlineDHT.hs1
-rw-r--r--src/Network/Kademlia/Bootstrap.hs1
-rw-r--r--src/Network/Lossless.hs1
-rw-r--r--src/Network/QueryResponse.hs1
-rw-r--r--src/Network/StreamServer.hs1
-rw-r--r--src/Network/Tox.hs1
-rw-r--r--src/Network/Tox/AggregateSession.hs1
-rw-r--r--src/Network/Tox/ContactInfo.hs1
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs1
-rw-r--r--src/Network/Tox/Crypto/Transport.hs1
-rw-r--r--src/Network/Tox/DHT/Handlers.hs1
-rw-r--r--src/Network/Tox/Handshake.hs1
-rw-r--r--src/Network/Tox/Onion/Handlers.hs1
-rw-r--r--src/Network/Tox/Onion/Transport.hs1
-rw-r--r--src/Network/Tox/Session.hs1
-rw-r--r--src/Network/UPNP.hs1
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
131import System.Entropy 131import System.Entropy
132import DPut 132import DPut
133import 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
83import System.Global6 83import System.Global6
84import Control.TriadCommittee 84import Control.TriadCommittee
85import DPut 85import DPut
86import DebugTag
86 87
87newtype NodeId = NodeId ByteString 88newtype 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
32import System.Entropy 32import System.Entropy
33import System.Timeout 33import System.Timeout
34import DPut 34import DPut
35import DebugTag
35 36
36import qualified Data.Wrapper.PSQInt as Int 37import 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
19import Data.PacketBuffer as PB 19import Data.PacketBuffer as PB
20import DPut 20import DPut
21import DebugTag
21import Network.QueryResponse 22import 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
38import System.IO.Error 38import System.IO.Error
39import System.Timeout 39import System.Timeout
40import DPut 40import DPut
41import 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.
43data TransportA err addr x y = Transport 44data 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
45import Network.SocketLike 45import Network.SocketLike
46import DPut 46import DPut
47import DebugTag
47 48
48data ServerHandle = ServerHandle Socket (Weak ThreadId) 49data 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
61import Network.Tox.ContactInfo 61import Network.Tox.ContactInfo
62import Text.XXD 62import Text.XXD
63import DPut 63import DPut
64import DebugTag
64import Network.Tox.Avahi 65import Network.Tox.Avahi
65import Network.Tox.Session 66import Network.Tox.Session
66import Network.SessionTransports 67import 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 (..))
41import Crypto.Tox (PublicKey, toPublic) 41import Crypto.Tox (PublicKey, toPublic)
42import Data.Wrapper.PSQInt as PSQ 42import Data.Wrapper.PSQInt as PSQ
43import DPut 43import DPut
44import DebugTag
44import Network.QueryResponse 45import Network.QueryResponse
45import Network.Tox.Crypto.Transport (CryptoMessage (..), pattern KillPacket, 46import 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
15import Network.Tox.NodeId (id2key) 15import Network.Tox.NodeId (id2key)
16import Network.Tox.Onion.Transport as Onion 16import Network.Tox.Onion.Transport as Onion
17import DPut 17import DPut
18import DebugTag
18 19
19newtype ContactInfo extra = ContactInfo 20newtype 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
51import Control.Concurrent.Supply 51import Control.Concurrent.Supply
52import Data.InOrOut 52import Data.InOrOut
53import DPut 53import DPut
54import DebugTag
54import Text.Printf 55import Text.Printf
55import Data.Bool 56import Data.Bool
56import Network.Tox.Handshake 57import 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
87import Data.Serialize as S 87import Data.Serialize as S
88import Control.Arrow 88import Control.Arrow
89import DPut 89import DPut
90import DebugTag
90import Data.PacketBuffer as PB 91import Data.PacketBuffer as PB
91 92
92showCryptoMsg :: Word32 -> CryptoMessage -> [Char] 93showCryptoMsg :: 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
40import Data.Serialize (Serialize) 40import Data.Serialize (Serialize)
41import Data.Word 41import Data.Word
42import DPut 42import DPut
43import DebugTag
43 44
44data TransactionId = TransactionId 45data 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
23import GHC.Conc (labelThread) 23import GHC.Conc (labelThread)
24#endif 24#endif
25import DPut 25import DPut
26import DebugTag
26 27
27 28
28anyRight :: Monad m => a -> [t] -> (t -> m (Either b b1)) -> m (Either a b1) 29anyRight :: 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
38import Data.Maybe 38import Data.Maybe
39import Data.Functor.Identity 39import Data.Functor.Identity
40import DPut 40import DPut
41import DebugTag
41 42
42type Client r = QR.Client String PacketKind TransactionId (OnionDestination r) Message 43type Client r = QR.Client String PacketKind TransactionId (OnionDestination r) Message
43type Message = OnionMessage Identity 44type 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
82import qualified Text.ParserCombinators.ReadP as RP 82import qualified Text.ParserCombinators.ReadP as RP
83import Data.Hashable 83import Data.Hashable
84import DPut 84import DPut
85import DebugTag
85 86
86type HandleLo a = Maybe (Either String (ByteString, SockAddr)) -> IO a 87type 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
20import Data.PacketBuffer (PacketInboundEvent (..)) 20import Data.PacketBuffer (PacketInboundEvent (..))
21import Data.Tox.Message 21import Data.Tox.Message
22import DPut 22import DPut
23import DebugTag
23import Network.Lossless 24import Network.Lossless
24import Network.QueryResponse 25import Network.QueryResponse
25import Network.SessionTransports 26import 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
6import System.Directory 6import System.Directory
7import System.Process as Process 7import System.Process as Process
8import DPut 8import DPut
9import DebugTag
9 10
10protocols :: SocketType -> [String] 11protocols :: SocketType -> [String]
11protocols Stream = ["tcp"] 12protocols Stream = ["tcp"]