Expand description
§pulse-protocol
Wire protocol definitions for the Pulse realtime communication engine.
This crate defines the binary protocol used for communication between Pulse clients and servers, including frame types, codecs, and versioning.
§Frame Types
Subscribe/Unsubscribe- Channel membershipPublish- Send messages to channelsPresence- Track online usersAck/Error- Acknowledgments and errors
§Example
use pulse_protocol::{Frame, codec};
// Create a publish frame using the helper method
let frame = Frame::publish("chat:lobby", b"Hello, world!".to_vec());
// Encode and decode
let encoded = codec::encode(&frame).unwrap();
let decoded = codec::decode(&encoded).unwrap();Re-exports§
pub use codec::decode;pub use codec::encode;pub use codec::ProtocolError;pub use frames::Frame;pub use frames::PresenceAction;pub use version::Version;pub use version::PROTOCOL_VERSION;