diff options
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/Torrent/Handshake.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Network/Torrent/Handshake.hs b/src/Network/Torrent/Handshake.hs new file mode 100644 index 00000000..d48d04e6 --- /dev/null +++ b/src/Network/Torrent/Handshake.hs | |||
@@ -0,0 +1,25 @@ | |||
1 | {-# LANGUAGE OverloadedStrings #-} | ||
2 | module Network.Torrent.Handshake | ||
3 | ( Handshake | ||
4 | ) where | ||
5 | |||
6 | import Data.Word | ||
7 | import Data.ByteString (ByteString) | ||
8 | import qualified Data.ByteString as B | ||
9 | |||
10 | data Handshake = Handshake { | ||
11 | hsProtocol :: ByteString | ||
12 | , hsReserved :: Word64 | ||
13 | , hsInfoHash :: ByteString | ||
14 | , hsPeerID :: ByteString | ||
15 | } deriving (Show, Eq) | ||
16 | |||
17 | defaultProtocol :: ByteString | ||
18 | defaultProtocol = "BitTorrent protocol" | ||
19 | |||
20 | |||
21 | fromByteString :: ByteString -> Handshake | ||
22 | fromByteString = undefined | ||
23 | |||
24 | toByteString :: Handshake -> ByteString | ||
25 | toByteString = undefined \ No newline at end of file | ||