summaryrefslogtreecommitdiff
path: root/src/Network/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox')
-rw-r--r--src/Network/Tox/DHT/Handlers.hs4
-rw-r--r--src/Network/Tox/DHT/Transport.hs28
2 files changed, 16 insertions, 16 deletions
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs
index 901da99e..f22f9ffe 100644
--- a/src/Network/Tox/DHT/Handlers.hs
+++ b/src/Network/Tox/DHT/Handlers.hs
@@ -127,8 +127,8 @@ newRouting addr crypto update4 update6 = do
127 let nobkts = R.defaultBucketCount :: Int 127 let nobkts = R.defaultBucketCount :: Int
128 tbl4 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info4 nobkts 128 tbl4 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info4 nobkts
129 tbl6 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info6 nobkts 129 tbl6 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info6 nobkts
130 committee4 <- newTriadCommittee (update4 tbl4) -- $ updateIPVote tbl4 addr4 130 committee4 <- newTriadCommittee (update4 tbl4) -- updateIPVote tbl4 addr4
131 committee6 <- newTriadCommittee (update6 tbl6) -- $ updateIPVote tbl6 addr6 131 committee6 <- newTriadCommittee (update6 tbl6) -- updateIPVote tbl6 addr6
132 sched4 <- newTVar Int.empty 132 sched4 <- newTVar Int.empty
133 sched6 <- newTVar Int.empty 133 sched6 <- newTVar Int.empty
134 return $ Routing tentative_info sched4 tbl4 committee4 sched6 tbl6 committee6 134 return $ Routing tentative_info sched4 tbl4 committee4 sched6 tbl6 committee6
diff --git a/src/Network/Tox/DHT/Transport.hs b/src/Network/Tox/DHT/Transport.hs
index 5a2d8a84..d7f8e0cd 100644
--- a/src/Network/Tox/DHT/Transport.hs
+++ b/src/Network/Tox/DHT/Transport.hs
@@ -146,21 +146,21 @@ noReplyAddr saddr = either (error . mappend "noReplyAddr: ") id $ nodeInfo zeroI
146 146
147 147
148data DHTRequest 148data DHTRequest
149-- #### NAT ping request 149 -- #### NAT ping request
150-- 150 --
151-- Length Contents 151 -- Length Contents
152-- :------- :------------------------- 152 -- :------- :-------------------------
153-- `1` `uint8_t` (0xfe) 153 -- `1` `uint8_t` (0xfe)
154-- `1` `uint8_t` (0x00) 154 -- `1` `uint8_t` (0x00)
155-- `8` `uint64_t` random number 155 -- `8` `uint64_t` random number
156 = NATPing Nonce8 156 = NATPing Nonce8
157-- #### NAT ping response 157 -- #### NAT ping response
158-- 158 --
159-- Length Contents 159 -- Length Contents
160-- :------- :----------------------------------------------------------------- 160 -- :------- :-----------------------------------------------------------------
161-- `1` `uint8_t` (0xfe) 161 -- `1` `uint8_t` (0xfe)
162-- `1` `uint8_t` (0x01) 162 -- `1` `uint8_t` (0x01)
163-- `8` `uint64_t` random number (the same that was received in request) 163 -- `8` `uint64_t` random number (the same that was received in request)
164 | NATPong Nonce8 164 | NATPong Nonce8
165 | DHTPK LongTermKeyWrap 165 | DHTPK LongTermKeyWrap
166 deriving Show 166 deriving Show