import Prelude hiding (lookup, concat, replicate, splitAt, take, drop)
-import Control.Concurrent.MVar (MVar, readMVar, putMVar, takeMVar)
+import Control.Concurrent.MVar (MVar, newEmptyMVar, readMVar, putMVar, takeMVar)
import Control.Monad.State
import Data.ByteString (ByteString, unpack, concat, hGet, hPut, take, drop, empty, singleton)
import Data.Bits
putStrLn $ "--> handhake to peer: " ++ show p
hsMsg <- hGet h (length (unpack hs))
putStrLn $ "<-- handshake from peer: " ++ show p
+ infoPieceMap <- newEmptyMVar
+ metadataMsgLoop h $ InfoState infoPieceMap
return ()
-- if doesPeerSupportExtendedMsg hsMsg
-- then