http_type/stream/type.rs
1use crate::*;
2
3/// A thread-safe reference-counted `TcpStream`.
4pub type ArcStream = Arc<TcpStream>;
5
6/// A read guard for a `RwLock<TcpStream>`.
7pub type RwLockReadGuardTcpStream<'a> = RwLockReadGuard<'a, TcpStream>;
8
9/// A write guard for a `RwLock<TcpStream>`.
10pub type RwLockWriteGuardTcpStream<'a> = RwLockWriteGuard<'a, TcpStream>;
11
12/// A thread-safe reference to a `RwLock` write guard for `TcpStream`.
13pub type ArcRwLockWriteGuardTcpStream<'a> = Arc<RwLockWriteGuard<'a, TcpStream>>;
14
15/// A thread-safe reference to a `Mutex` guard for `TcpStream`.
16pub type ArcMutexGuardTcpStream<'a> = Arc<MutexGuard<'a, TcpStream>>;
17
18/// A socket host represented by an IP address.
19pub type SocketHost = IpAddr;
20
21/// A socket port number.
22pub type SocketPort = u16;