summaryrefslogtreecommitdiff
path: root/dht/src/Network/QueryResponse
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-11-27 22:20:39 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-01 22:50:28 -0500
commit978eecfe2854ce093a5e93e1cb7fbde3677173aa (patch)
treede26802bfa0ce2d126494b88e316fa8060651e14 /dht/src/Network/QueryResponse
parenta39e744dd2c6895cc287cf43ed4704252dcf8293 (diff)
Show instance for RouteRecord and OnionRoute.
Diffstat (limited to 'dht/src/Network/QueryResponse')
-rw-r--r--dht/src/Network/QueryResponse/TCP.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/dht/src/Network/QueryResponse/TCP.hs b/dht/src/Network/QueryResponse/TCP.hs
index e4831fb2..fdca86b4 100644
--- a/dht/src/Network/QueryResponse/TCP.hs
+++ b/dht/src/Network/QueryResponse/TCP.hs
@@ -175,6 +175,11 @@ closeAll tcpcache stream = do
175 case r of TCPSession{tcpState=st,tcpHandle=h} -> streamGoodbye st >> hClose h 175 case r of TCPSession{tcpState=st,tcpHandle=h} -> streamGoodbye st >> hClose h
176 _ -> return () 176 _ -> return ()
177 177
178-- Use a cache of TCP client connections for sending (and receiving) packets.
179-- The boolean value prepended to the message allows the sender to specify
180-- whether or not a new connection will be initiated if neccessary. If 'False'
181-- is passed, then the packet will be sent only if there already exists a
182-- connection.
178tcpTransport :: Int -- ^ maximum number of TCP links to maintain. 183tcpTransport :: Int -- ^ maximum number of TCP links to maintain.
179 -> StreamHandshake addr x y 184 -> StreamHandshake addr x y
180 -> IO (TCPCache (SessionProtocol x y), TransportA err addr x (Bool,y)) 185 -> IO (TCPCache (SessionProtocol x y), TransportA err addr x (Bool,y))