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§
- Frame
Codec - Length-prefixed binary codec used by production-style clients.
- Line
Codec - Newline-delimited text codec for human-friendly clients (
nc, telnet).
Enums§
- Message
- Semantic messages shared by both line and frame encodings.
- Wire
Pact Error
Constants§
Functions§
- looks_
like_ binary - Detect whether incoming bytes look like the binary frame protocol.