#![doc = document_features::document_features!()]
#[cfg(feature = "client")]
pub(crate) mod tcp_client;
#[cfg(feature = "client")]
mod buffered_client;
#[cfg(feature = "client")]
pub use {buffered_client::Client, tcp_client::ClientError};
#[cfg(feature = "server")]
mod server;
#[cfg(feature = "server")]
pub use server::{serve, ConnectionError, ServerError, ServerOptions};
pub const PROTOCOL_VERSION_0: u16 = 0;
pub const PROTOCOL_VERSION_1: u16 = 1;
pub const PROTOCOL_HEADER: &str = "rerun";
pub const DEFAULT_SERVER_PORT: u16 = 9876;
pub fn default_server_addr() -> std::net::SocketAddr {
std::net::SocketAddr::from(([127, 0, 0, 1], DEFAULT_SERVER_PORT))
}
#[allow(clippy::unnecessary_wraps)]
pub fn default_flush_timeout() -> Option<std::time::Duration> {
Some(std::time::Duration::from_secs(2))
}