diff options
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r-- | src/Network/Tox.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index d434360f..d5db6979 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -174,7 +174,7 @@ myAddr routing maddr = atomically $ do | |||
174 | 174 | ||
175 | newClient :: (DRG g, Show addr, Show meth) => | 175 | newClient :: (DRG g, Show addr, Show meth) => |
176 | g -> Transport String addr x | 176 | g -> Transport String addr x |
177 | -> (x -> MessageClass String meth DHT.TransactionId) | 177 | -> (Client String meth DHT.TransactionId addr x -> x -> MessageClass String meth DHT.TransactionId addr x) |
178 | -> (Maybe addr -> IO addr) | 178 | -> (Maybe addr -> IO addr) |
179 | -> (meth -> Maybe (MethodHandler String DHT.TransactionId addr x)) | 179 | -> (meth -> Maybe (MethodHandler String DHT.TransactionId addr x)) |
180 | -> (forall d. TransactionMethods d DHT.TransactionId addr x -> TransactionMethods d DHT.TransactionId addr x) | 180 | -> (forall d. TransactionMethods d DHT.TransactionId addr x -> TransactionMethods d DHT.TransactionId addr x) |
@@ -195,8 +195,8 @@ newClient drg net classify selfAddr handlers modifytbl modifynet = do | |||
195 | let word64mapT = transactionMethods (contramap w64Key w64MapMethods) gen | 195 | let word64mapT = transactionMethods (contramap w64Key w64MapMethods) gen |
196 | map_var <- atomically $ newTVar (drg, Data.Word64Map.empty) | 196 | map_var <- atomically $ newTVar (drg, Data.Word64Map.empty) |
197 | return $ Left (word64mapT,map_var) | 197 | return $ Left (word64mapT,map_var) |
198 | let dispatch tbl var handlers = DispatchMethods | 198 | let dispatch tbl var handlers client = DispatchMethods |
199 | { classifyInbound = classify | 199 | { classifyInbound = classify client |
200 | , lookupHandler = handlers -- var | 200 | , lookupHandler = handlers -- var |
201 | , tableMethods = modifytbl tbl | 201 | , tableMethods = modifytbl tbl |
202 | } | 202 | } |
@@ -204,7 +204,7 @@ newClient drg net classify selfAddr handlers modifytbl modifynet = do | |||
204 | mkclient (tbl,var) handlers = | 204 | mkclient (tbl,var) handlers = |
205 | let client = Client | 205 | let client = Client |
206 | { clientNet = addHandler eprinter (handleMessage client) $ modifynet client net | 206 | { clientNet = addHandler eprinter (handleMessage client) $ modifynet client net |
207 | , clientDispatcher = dispatch tbl var handlers | 207 | , clientDispatcher = dispatch tbl var handlers client |
208 | , clientErrorReporter = eprinter { reportTimeout = reportTimeout ignoreErrors } | 208 | , clientErrorReporter = eprinter { reportTimeout = reportTimeout ignoreErrors } |
209 | , clientPending = var | 209 | , clientPending = var |
210 | , clientAddress = selfAddr | 210 | , clientAddress = selfAddr |
@@ -301,7 +301,7 @@ newTox keydb addr = do | |||
301 | atomically $ newTVar nil { maxInterval = 20 } -- 20 second timeout on announce ping-ids. | 301 | atomically $ newTVar nil { maxInterval = 20 } -- 20 second timeout on announce ping-ids. |
302 | oniondrg <- drgNew | 302 | oniondrg <- drgNew |
303 | let onionnet = layerTransportM (Onion.decrypt crypto) (Onion.encrypt crypto) onioncrypt | 303 | let onionnet = layerTransportM (Onion.decrypt crypto) (Onion.encrypt crypto) onioncrypt |
304 | onionclient <- newClient oniondrg onionnet Onion.classify | 304 | onionclient <- newClient oniondrg onionnet (const Onion.classify) |
305 | (getOnionAlias crypto $ R.thisNode <$> readTVar (DHT.routing4 routing)) | 305 | (getOnionAlias crypto $ R.thisNode <$> readTVar (DHT.routing4 routing)) |
306 | (Onion.handlers onionnet routing toks keydb) | 306 | (Onion.handlers onionnet routing toks keydb) |
307 | (hookQueries orouter DHT.transactionKey) | 307 | (hookQueries orouter DHT.transactionKey) |