Skip to main content

Crate wirepact

Crate wirepact 

Source
Expand description

WirePact — a teaching protocol where the contract is explicit.

§The idea

TCP gives you bytes. Application protocols turn bytes into messages. WirePact demonstrates two common framing styles:

  • LineCodec — newline-delimited text (nc-friendly)
  • FrameCodec — length-prefixed binary frames (production-style)

Both encodings share the same semantic Message types.

Structs§

FrameCodec
Length-prefixed binary codec used by production-style clients.
LineCodec
Newline-delimited text codec for human-friendly clients (nc, telnet).

Enums§

Message
Semantic messages shared by both line and frame encodings.
WirePactError

Constants§

DEFAULT_MAX_FRAME_SIZE

Functions§

looks_like_binary
Detect whether incoming bytes look like the binary frame protocol.

Type Aliases§

Result