writeFile path (BC.replicate size '\0')
-- loop1 :: shake hands with all peers, find out the pieces they have, form PieceData.
writeFile path (BC.replicate size '\0')
-- loop1 :: shake hands with all peers, find out the pieces they have, form PieceData.
handlePeerMsgs :: Peer -> Metainfo -> String -> (String -> IO ()) -> IO ()
handlePeerMsgs p m peerId logFn = do
h <- handShake p (infoHash m) peerId
handlePeerMsgs :: Peer -> Metainfo -> String -> (String -> IO ()) -> IO ()
handlePeerMsgs p m peerId logFn = do
h <- handShake p (infoHash m) peerId