pub struct Handshake<C>where
C: ClusterAPI,{
pub prefix: String,
pub raddr: SocketAddr,
pub config: Config,
pub proto: Protocol,
pub cluster: C,
pub conn: Option<TcpStream>,
}
Expand description
Type handles incoming connection.
Complete the handshake by sending the appropriate CONNACK packet. This type is threadable and spawned for every incoming connection, once the handshake is completed, connection is handed over to the Cluster.
Fields§
§prefix: String
§raddr: SocketAddr
§config: Config
§proto: Protocol
§cluster: C
§conn: Option<TcpStream>
Trait Implementations§
Source§impl<C> Threadable for Handshake<C>where
C: ClusterAPI,
impl<C> Threadable for Handshake<C>where
C: ClusterAPI,
Source§impl<C> ToJson for Handshake<C>where
C: ClusterAPI,
impl<C> ToJson for Handshake<C>where
C: ClusterAPI,
Source§fn to_config_json(&self) -> String
fn to_config_json(&self) -> String
Implementing type shall return configuration as JSON string.
Source§fn to_stats_json(&self) -> String
fn to_stats_json(&self) -> String
Implementing type shall return statistics as JSON string.
Auto Trait Implementations§
impl<C> !Freeze for Handshake<C>
impl<C> RefUnwindSafe for Handshake<C>where
C: RefUnwindSafe,
impl<C> Send for Handshake<C>where
C: Send,
impl<C> Sync for Handshake<C>where
C: Sync,
impl<C> Unpin for Handshake<C>where
C: Unpin,
impl<C> UnwindSafe for Handshake<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more