From c7d84e12184430062305d1d4677a90df558484ea Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Sat, 14 Dec 2013 22:43:23 +0400 Subject: Add stub for hintRead function --- src/System/Torrent/Storage.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/System/Torrent/Storage.hs') diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs index 8ad4d3e5..214998a9 100644 --- a/src/System/Torrent/Storage.hs +++ b/src/System/Torrent/Storage.hs @@ -34,6 +34,7 @@ module System.Torrent.Storage -- * Modification , writePiece , readPiece + , hintRead , unsafeReadPiece ) where @@ -103,6 +104,10 @@ readPiece pix s @ Storage {..} offset = fromIntegral pix * fromIntegral pieceLen sz = fromIntegral pieceLen +-- | Hint about the coming 'readPiece'. +hintRead :: PieceIx -> Storage -> IO () +hintRead _pix Storage {..} = return () + unsafeReadPiece :: PieceIx -> Storage -> IO (Piece BL.ByteString) unsafeReadPiece pix s @ Storage {..} | not (isValidIx pix s) = throwIO (InvalidIndex pix) -- cgit v1.2.3