diff options
Diffstat (limited to 'dht/src/Network/QueryResponse')
-rw-r--r-- | dht/src/Network/QueryResponse/TCP.hs | 5 |
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. | ||
178 | tcpTransport :: Int -- ^ maximum number of TCP links to maintain. | 183 | tcpTransport :: 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)) |