Crate pulse_protocol

Crate pulse_protocol 

Source
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 membership
  • Publish - Send messages to channels
  • Presence - Track online users
  • Ack / 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;

Modules§

codec
Codec for encoding and decoding Pulse frames.
frames
Frame types for the Pulse protocol.
version
Protocol versioning for Pulse.