module CQL::Postgres::Wire::Backend

Overview

Messages a server sends, decoded from their payloads.

Defined in:

postgres/wire/backend.cr

Constant Summary

EAGER_READ_SIZE = 64 * 1024
MAX_MESSAGE_SIZE = 1 << 30

Class Method Summary

Class Method Detail

def self.decode(type : Char, reader : Reader) : Message #

[View source]
def self.read(io : IO, max_size : Int32 = MAX_MESSAGE_SIZE) : Message #

Reads and decodes the next message from io. Messages over max_size are refused, and big payloads are buffered only as they arrive so a hostile length cannot reserve memory the peer never sends.


[View source]