Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.ClickHouseDriver.IO.BufferedReader
Description
Tools to analyze protocol and deserialize data sent from server. This module is for internal use only.
Synopsis
- readBinaryStrWithLength :: Int -> Reader ByteString
- readVarInt' :: Buffer -> IO (Word, Buffer)
- readBinaryStr' :: Buffer -> IO (ByteString, Buffer)
- readBinaryStr :: Reader ByteString
- readVarInt :: Reader Word
- readBinaryInt8 :: Reader Int8
- readBinaryInt16 :: Reader Int16
- readBinaryInt64 :: Reader Int64
- readBinaryInt32 :: Reader Int32
- readBinaryUInt8 :: Reader Word8
- readBinaryUInt128 :: Reader Word128
- readBinaryUInt64 :: Reader Word64
- readBinaryUInt32 :: Reader Word32
- readBinaryUInt16 :: Reader Word16
- type Reader a = StateT Buffer IO a
- data Buffer = Buffer {}
- createBuffer :: Int -> Socket -> IO Buffer
- refill :: Buffer -> IO Buffer
Documentation
Arguments
:: Buffer | Buffer to be read |
-> IO (ByteString, Buffer) | (the string read from Buffer, the buffer after reading) |
read binary string from buffer. It first read the integer(n) in front of the desired string, then it read n bytes to capture the whole string.
readVarInt :: Reader Word Source #
Buffer is for receiving data from TCP stream. Whenever all bytes are read, it automatically refill from the stream.