diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-13 05:58:27 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-13 05:58:27 +0400 |
commit | 61cb316ff3eeceaaaf65da3a0c902537219fe146 (patch) | |
tree | da3050bed8be5b85ffc1279f779d3252b3496aa8 | |
parent | d61e6f0b46bb2d92e40c256aab2f47fc54c6d161 (diff) |
Add peer addr param to acceptWire
-rw-r--r-- | src/Network/BitTorrent/Exchange/Wire.hs | 7 |
1 files changed, 5 insertions, 2 deletions
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 | |||
458 | -- | Various stats about messages sent and received. Stats can be | 458 | -- | Various stats about messages sent and received. Stats can be |
459 | -- used to protect /this/ peer against flood attacks. | 459 | -- used to protect /this/ peer against flood attacks. |
460 | , connStats :: !(IORef ConnectionStats) | 460 | , connStats :: !(IORef ConnectionStats) |
461 | |||
462 | -- -- | Max request queue length. | ||
463 | -- , connMaxQueueLen :: !Int | ||
461 | } | 464 | } |
462 | 465 | ||
463 | instance Pretty Connection where | 466 | instance Pretty Connection where |
@@ -670,7 +673,7 @@ connectWire hs addr extCaps wire = | |||
670 | -- | 673 | -- |
671 | -- This function can throw 'WireFailure' exception. | 674 | -- This function can throw 'WireFailure' exception. |
672 | -- | 675 | -- |
673 | acceptWire :: Socket -> Wire () -> IO () | 676 | acceptWire :: Socket -> PeerAddr -> Wire () -> IO () |
674 | acceptWire sock wire = do | 677 | acceptWire sock peerAddr wire = do |
675 | bracket (return sock) close $ \ _ -> do | 678 | bracket (return sock) close $ \ _ -> do |
676 | error "acceptWire: not implemented" | 679 | error "acceptWire: not implemented" |