From 978eecfe2854ce093a5e93e1cb7fbde3677173aa Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Wed, 27 Nov 2019 22:20:39 -0500 Subject: Show instance for RouteRecord and OnionRoute. --- dht/src/Network/QueryResponse/TCP.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dht/src/Network/QueryResponse') 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 case r of TCPSession{tcpState=st,tcpHandle=h} -> streamGoodbye st >> hClose h _ -> return () +-- Use a cache of TCP client connections for sending (and receiving) packets. +-- The boolean value prepended to the message allows the sender to specify +-- whether or not a new connection will be initiated if neccessary. If 'False' +-- is passed, then the packet will be sent only if there already exists a +-- connection. tcpTransport :: Int -- ^ maximum number of TCP links to maintain. -> StreamHandshake addr x y -> IO (TCPCache (SessionProtocol x y), TransportA err addr x (Bool,y)) -- cgit v1.2.3