summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index 37762eb8..83a17037 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -116,11 +116,17 @@ myAddr routing4 routing6 maddr = atomically $ do
116 116
117newClient :: (DRG g, Show addr, Show meth) => 117newClient :: (DRG g, Show addr, Show meth) =>
118 g -> Transport String addr x 118 g -> Transport String addr x
119 -> (Client String meth DHT.TransactionId addr x -> x -> MessageClass String meth DHT.TransactionId addr x) 119 -> (Client String meth DHT.TransactionId addr x
120 -> x
121 -> MessageClass String meth DHT.TransactionId addr x)
120 -> (Maybe addr -> IO addr) 122 -> (Maybe addr -> IO addr)
121 -> (Client String meth DHT.TransactionId addr x -> meth -> Maybe (MethodHandler String DHT.TransactionId addr x)) 123 -> (Client String meth DHT.TransactionId addr x
122 -> (forall d. TransactionMethods d DHT.TransactionId addr x -> TransactionMethods d DHT.TransactionId addr x) 124 -> meth
123 -> (Client String meth DHT.TransactionId addr x -> Transport String addr x -> Transport String addr x) 125 -> Maybe (MethodHandler String DHT.TransactionId addr x))
126 -> (forall d. TransactionMethods d DHT.TransactionId addr x
127 -> TransactionMethods d DHT.TransactionId addr x)
128 -> (Client String meth DHT.TransactionId addr x
129 -> Transport String addr x -> Transport String addr x)
124 -> IO (Client String meth DHT.TransactionId addr x) 130 -> IO (Client String meth DHT.TransactionId addr x)
125newClient drg net classify selfAddr handlers modifytbl modifynet = do 131newClient drg net classify selfAddr handlers modifytbl modifynet = do
126 -- If we have 8-byte keys for IntMap, then use it for transaction lookups. 132 -- If we have 8-byte keys for IntMap, then use it for transaction lookups.
@@ -139,8 +145,8 @@ newClient drg net classify selfAddr handlers modifytbl modifynet = do
139 return $ Left (word64mapT,map_var) 145 return $ Left (word64mapT,map_var)
140 let dispatch tbl var handlers client = DispatchMethods 146 let dispatch tbl var handlers client = DispatchMethods
141 { classifyInbound = classify client 147 { classifyInbound = classify client
142 , lookupHandler = handlers -- var 148 , lookupHandler = handlers -- var
143 , tableMethods = modifytbl tbl 149 , tableMethods = modifytbl tbl
144 } 150 }
145 eprinter = logErrors -- printErrors stderr 151 eprinter = logErrors -- printErrors stderr
146 mkclient (tbl,var) handlers = 152 mkclient (tbl,var) handlers =