Struct fluvio_socket::MultiplexerSocket
source · pub struct MultiplexerSocket { /* private fields */ }Expand description
Socket that can multiplex connections
Implementations§
source§impl MultiplexerSocket
impl MultiplexerSocket
sourcepub fn new(socket: FluvioSocket) -> Self
pub fn new(socket: FluvioSocket) -> Self
create new multiplexer socket, this always starts with correlation id of 1 correlation id of 0 means shared
pub fn set_stale(&self)
pub fn is_stale(&self) -> bool
sourcepub async fn send_and_receive<R>(
&self,
req_msg: RequestMessage<R>
) -> Result<R::Response, SocketError>where
R: Request,
pub async fn send_and_receive<R>( &self, req_msg: RequestMessage<R> ) -> Result<R::Response, SocketError>where R: Request,
create socket to perform request and response
sourcepub async fn send_async<R>(
&self,
req_msg: RequestMessage<R>
) -> Result<AsyncResponse<R>, SocketError>where
R: Request,
pub async fn send_async<R>( &self, req_msg: RequestMessage<R> ) -> Result<AsyncResponse<R>, SocketError>where R: Request,
send request and get response asynchronously
sourcepub async fn create_stream<R>(
&self,
req_msg: RequestMessage<R>,
queue_len: usize
) -> Result<AsyncResponse<R>, SocketError>where
R: Request,
pub async fn create_stream<R>( &self, req_msg: RequestMessage<R>, queue_len: usize ) -> Result<AsyncResponse<R>, SocketError>where R: Request,
create stream response