Expose generated modules and add some top-level docs
This commit is contained in:
parent
5e53e48156
commit
87772ea0a5
1 changed files with 26 additions and 0 deletions
26
src/lib.rs
26
src/lib.rs
|
@ -1 +1,27 @@
|
||||||
|
//! The Home Assistant protocol is structured as a simple
|
||||||
|
//! TCP socket with short binary messages encoded in the protocol buffers format.
|
||||||
|
//! First, a message in this protocol has a specific format:
|
||||||
|
//!
|
||||||
|
//! * A zero byte.
|
||||||
|
//! * VarInt denoting the size of the message object. (type is not part of this)
|
||||||
|
//! * VarInt denoting the type of message.
|
||||||
|
//! * The message object encoded as a ProtoBuf message
|
||||||
|
//!
|
||||||
|
//! The connection is established in 4 steps:
|
||||||
|
//!
|
||||||
|
//! * First, the client connects to the server and sends a [Hello Request](api::HelloRequest)
|
||||||
|
//! identifying itself
|
||||||
|
//! * The server responds with a [Hello Response](api::HelloResponse) and selects the
|
||||||
|
//! protocol version
|
||||||
|
//! * After receiving this message, the client attempts to authenticate itself using
|
||||||
|
//! the password and a [Connect Request](api::ConnectRequest)
|
||||||
|
//! * The server responds with a [Connect Response](api::ConnectResponse) and notifies
|
||||||
|
//! of invalid password if necessary.
|
||||||
|
//!
|
||||||
|
//! If anything in this initial process fails, the connection must immediately closed
|
||||||
|
//! by both sides and _no_ disconnection message is to be sent.
|
||||||
|
|
||||||
mod generated;
|
mod generated;
|
||||||
|
|
||||||
|
pub use generated::api;
|
||||||
|
pub use generated::api_options;
|
||||||
|
|
Loading…
Reference in a new issue