blob: d48d04e658aca3b6931d1866884c20cfb0be8be7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# LANGUAGE OverloadedStrings #-}
module Network.Torrent.Handshake
( Handshake
) where
import Data.Word
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
data Handshake = Handshake {
hsProtocol :: ByteString
, hsReserved :: Word64
, hsInfoHash :: ByteString
, hsPeerID :: ByteString
} deriving (Show, Eq)
defaultProtocol :: ByteString
defaultProtocol = "BitTorrent protocol"
fromByteString :: ByteString -> Handshake
fromByteString = undefined
toByteString :: Handshake -> ByteString
toByteString = undefined
|