summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Exchange/Wire.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Wire.hs')
-rw-r--r--src/Network/BitTorrent/Exchange/Wire.hs6
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.
508connectToPeer :: PeerAddr -> IO Socket 508connectToPeer :: (IPAddress i) => PeerAddr i -> IO Socket
509connectToPeer p = do 509connectToPeer 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--
631connectWire :: Handshake -> PeerAddr -> ExtendedCaps -> Wire () -> IO () 631connectWire :: (IPAddress i) => Handshake -> PeerAddr i -> ExtendedCaps -> Wire () -> IO ()
632connectWire hs addr extCaps wire = 632connectWire 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--
676acceptWire :: Socket -> PeerAddr -> Wire () -> IO () 676acceptWire :: (IPAddress i) => Socket -> PeerAddr i -> Wire () -> IO ()
677acceptWire sock peerAddr wire = do 677acceptWire 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"