ssip_client/lib.rs
1// ssip-client -- Speech Dispatcher client in Rust
2// Copyright (c) 2021-2022 Laurent Pelecq
3//
4// Licensed under the Apache License, Version 2.0
5// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT
6// license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7// option. All files in the project carrying such notice may not be copied,
8// modified, or distributed except according to those terms.
9
10//! # SSIP client
11//!
12//! `ssip-client` implements a Speech Dispatcher SSIP client library in
13//! pure rust.
14//!
15//! See [`client::Client`] for the blocking API and [`poll::QueuedClient`] for the non-blocking API.
16//!
17//! Example
18//! ```no_run
19//! use ssip_client::{fifo, ClientName};
20//! let mut client = fifo::Builder::new().build()?;
21//! client
22//! .set_client_name(ClientName::new("joe", "hello"))?
23//! .check_client_name_set()?;
24//! let msg_id = client.speak()?.send_line("hello")?.receive_message_id()?;
25//! client.quit()?;
26//! # Ok::<(), ssip_client::ClientError>(())
27//! ```
28
29#[macro_use]
30mod protocol;
31
32mod poll;
33mod types;
34
35pub mod client;
36pub mod constants;
37#[cfg(unix)]
38pub mod fifo;
39pub mod net;
40pub mod tcp;
41
42#[cfg(any(not(feature = "async-mio"), doc))]
43pub use client::Client;
44
45pub use client::{Request, Response};
46pub use constants::*;
47pub use poll::QueuedClient;
48pub use types::*;