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
Trait Implementations§
source§impl Debug for MultiplexerSocket
impl Debug for MultiplexerSocket
Auto Trait Implementations§
impl !RefUnwindSafe for MultiplexerSocket
impl Send for MultiplexerSocket
impl Sync for MultiplexerSocket
impl Unpin for MultiplexerSocket
impl !UnwindSafe for MultiplexerSocket
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