From 61cb316ff3eeceaaaf65da3a0c902537219fe146 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 13 Dec 2013 05:58:27 +0400 Subject: Add peer addr param to acceptWire --- src/Network/BitTorrent/Exchange/Wire.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Network/BitTorrent/Exchange') diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Wire.hs index f61e59fa..ae9babb3 100644 --- a/src/Network/BitTorrent/Exchange/Wire.hs +++ b/src/Network/BitTorrent/Exchange/Wire.hs @@ -458,6 +458,9 @@ data Connection = Connection -- | Various stats about messages sent and received. Stats can be -- used to protect /this/ peer against flood attacks. , connStats :: !(IORef ConnectionStats) + +-- -- | Max request queue length. +-- , connMaxQueueLen :: !Int } instance Pretty Connection where @@ -670,7 +673,7 @@ connectWire hs addr extCaps wire = -- -- This function can throw 'WireFailure' exception. -- -acceptWire :: Socket -> Wire () -> IO () -acceptWire sock wire = do +acceptWire :: Socket -> PeerAddr -> Wire () -> IO () +acceptWire sock peerAddr wire = do bracket (return sock) close $ \ _ -> do error "acceptWire: not implemented" -- cgit v1.2.3