ssip_client_async/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 synchronous API and [`poll::QueuedClient`] for the asynchronous API.
16//!
17//! Example
18//! ```no_run
19//! use ssip_client_async::{fifo, ClientName};
20//! let mut client = fifo::synchronous::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_async::ClientError>(())
27//! ```
28
29#[macro_use]
30mod protocol;
31
32mod poll;
33pub use ssip as types;
34
35pub mod client;
36pub mod constants;
37#[cfg(unix)]
38pub mod fifo;
39pub mod net;
40pub mod tcp;
41
42pub use client::Client;
43#[cfg(feature = "async-mio")]
44pub use client::MioClient;
45
46#[cfg(feature = "async-io")]
47pub mod async_io;
48#[cfg(feature = "tokio")]
49pub mod tokio;
50
51pub use constants::*;
52#[cfg(feature = "async-mio")]
53pub use poll::MioQueuedClient;
54pub use poll::QueuedClient;
55pub use types::*;