Skip to content

Instantly share code, notes, and snippets.

@Interfere
Created December 20, 2016 12:28
Show Gist options
  • Save Interfere/6aeb9057b0f10087cb91c08d4b6adaaa to your computer and use it in GitHub Desktop.
Save Interfere/6aeb9057b0f10087cb91c08d4b6adaaa to your computer and use it in GitHub Desktop.
encodeMessage (Request idx begin length) = runPut $ do
putWord32be (13 :: Word32)
putWord8 (6 :: Word8)
putWord32be (fromIntegral idx)
putWord32be (fromIntegral begin)
putWord32be (fromIntegral length)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment