33 stream_reader::stream_reader(istream *s,
int max_message_length,
bool block_read) :
34 reader(max_message_length, block_read),
virtual int read_next_char()
A class to read JSON messages from various types of input stream.
virtual bool read_next_block()
#define NAMESPACE
You can change the namespace of the whole library by changing this value.
Specific class of exceptions for IO errors of various types.
unsigned char m_block[block_size]
If we're reading blocks, the block data.
std::istream * m_stream
The C++ stream to read from.
Common defs needed everywhere and, as far as is possible, platform specific changes.
The POSIX read() system call failed.
int m_block_index
If we're reading blocks, the index into the current block.
static const int block_size
Amount of data to read at once when in block read mode.
The json_io_exception class.
int m_block_num_bytes
If we're reading blocks, the number of bytes in the current block.