module

Pylon::Wire

stdlibs IO reports failures by throwing exceptions. We want to avoid exceptions as they can leave the application in undesirable states but also make potential failures invisible to the type system. Here we effectively wrap the session's stream IO to explicitly handle the exceptions as they happen and convert them into values. This allows us to encode the potential failures into the return type and force callers to handle them as needed.

Constants

CAPACITY_HINT_CAP = 4096
DIGEST_BYTES = 32
IDENTITY = "PYLON"
MAX_CONTENT_BYTES = (256 * 1024) * 1024
MAX_FIELD_BYTES = 1 << 20
PROTOCOL = 11_u32

Class methods

capacity_hint(count : UInt32) : Int32
Source

Nested types