diff options
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Wire.hs')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Wire.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Wire.hs index ae9babb3..27b4be12 100644 --- a/src/Network/BitTorrent/Exchange/Wire.hs +++ b/src/Network/BitTorrent/Exchange/Wire.hs | |||
@@ -505,7 +505,7 @@ initiateHandshake sock hs = do | |||
505 | recvHandshake sock | 505 | recvHandshake sock |
506 | 506 | ||
507 | -- | Tries to connect to peer using reasonable default parameters. | 507 | -- | Tries to connect to peer using reasonable default parameters. |
508 | connectToPeer :: PeerAddr -> IO Socket | 508 | connectToPeer :: (IPAddress i) => PeerAddr i -> IO Socket |
509 | connectToPeer p = do | 509 | connectToPeer p = do |
510 | sock <- socket AF_INET Stream Network.Socket.defaultProtocol | 510 | sock <- socket AF_INET Stream Network.Socket.defaultProtocol |
511 | connect sock (peerSockAddr p) | 511 | connect sock (peerSockAddr p) |
@@ -628,7 +628,7 @@ reconnect = undefined | |||
628 | -- | 628 | -- |
629 | -- This function can throw 'WireFailure' exception. | 629 | -- This function can throw 'WireFailure' exception. |
630 | -- | 630 | -- |
631 | connectWire :: Handshake -> PeerAddr -> ExtendedCaps -> Wire () -> IO () | 631 | connectWire :: (IPAddress i) => Handshake -> PeerAddr i -> ExtendedCaps -> Wire () -> IO () |
632 | connectWire hs addr extCaps wire = | 632 | connectWire hs addr extCaps wire = |
633 | bracket (connectToPeer addr) close $ \ sock -> do | 633 | bracket (connectToPeer addr) close $ \ sock -> do |
634 | hs' <- initiateHandshake sock hs | 634 | hs' <- initiateHandshake sock hs |
@@ -673,7 +673,7 @@ connectWire hs addr extCaps wire = | |||
673 | -- | 673 | -- |
674 | -- This function can throw 'WireFailure' exception. | 674 | -- This function can throw 'WireFailure' exception. |
675 | -- | 675 | -- |
676 | acceptWire :: Socket -> PeerAddr -> Wire () -> IO () | 676 | acceptWire :: (IPAddress i) => Socket -> PeerAddr i -> Wire () -> IO () |
677 | acceptWire sock peerAddr wire = do | 677 | acceptWire sock peerAddr wire = do |
678 | bracket (return sock) close $ \ _ -> do | 678 | bracket (return sock) close $ \ _ -> do |
679 | error "acceptWire: not implemented" | 679 | error "acceptWire: not implemented" |