Skip to main content

Crate marionette

Crate marionette 

Source
Expand description

Minimal scripted MQTT v5 “broker” for protocol edge cases that a real broker will never produce. Examples are unsolicited packets, missing CONNACKs, sockets that stop reading and unusual CONNACK properties.

This is not a conforming broker: each test scripts the exact packets to read and write. Packets are encoded/decoded with finmqtt-core, so tests can construct and inspect them with the regular packet types.

Structs§

Broker
A TCP listener that hands out scripted MQTT connections.
Conn
One scripted broker-side connection.
RecvPacket
A packet received from the client: fixed header plus body bytes.

Constants§

DEADLINE 🔒
Default deadline for blocking-style helpers (Broker::accept, Conn::read_packet).