summaryrefslogtreecommitdiff
path: root/src/Network/Torrent/Handshake.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Torrent/Handshake.hs')
-rw-r--r--src/Network/Torrent/Handshake.hs25
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 #-}
2module Network.Torrent.Handshake
3 ( Handshake
4 ) where
5
6import Data.Word
7import Data.ByteString (ByteString)
8import qualified Data.ByteString as B
9
10data Handshake = Handshake {
11 hsProtocol :: ByteString
12 , hsReserved :: Word64
13 , hsInfoHash :: ByteString
14 , hsPeerID :: ByteString
15 } deriving (Show, Eq)
16
17defaultProtocol :: ByteString
18defaultProtocol = "BitTorrent protocol"
19
20
21fromByteString :: ByteString -> Handshake
22fromByteString = undefined
23
24toByteString :: Handshake -> ByteString
25toByteString = undefined \ No newline at end of file