Struct fluvio_socket::FluvioSocket
source · pub struct FluvioSocket { /* private fields */ }
Expand description
Socket abstract that can send and receive fluvio objects
Implementations§
source§impl FluvioSocket
impl FluvioSocket
pub fn new(sink: FluvioSink, stream: FluvioStream) -> Self
pub fn split(self) -> (FluvioSink, FluvioStream)
pub fn is_stale(&self) -> bool
pub fn get_mut_sink(&mut self) -> &mut FluvioSink
pub fn get_mut_stream(&mut self) -> &mut FluvioStream
pub fn id(&self) -> ConnectionFd
sourcepub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError>where
R: Request,
pub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError>where
R: Request,
as client, send request and wait for reply from server
source§impl FluvioSocket
impl FluvioSocket
pub fn from_stream( write: BoxWriteConnection, read: BoxReadConnection, fd: ConnectionFd ) -> Self
sourcepub async fn connect_with_connector(
addr: &str,
connector: &dyn TcpDomainConnector
) -> Result<Self, SocketError>
pub async fn connect_with_connector( addr: &str, connector: &dyn TcpDomainConnector ) -> Result<Self, SocketError>
connect to target address with connector
source§impl FluvioSocket
impl FluvioSocket
pub async fn connect(addr: &str) -> Result<Self, SocketError>
Trait Implementations§
source§impl Debug for FluvioSocket
impl Debug for FluvioSocket
source§impl From<(FluvioSink, FluvioStream)> for FluvioSocket
impl From<(FluvioSink, FluvioStream)> for FluvioSocket
source§fn from(pair: (FluvioSink, FluvioStream)) -> Self
fn from(pair: (FluvioSink, FluvioStream)) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FluvioSocket
impl !RefUnwindSafe for FluvioSocket
impl Send for FluvioSocket
impl Sync for FluvioSocket
impl Unpin for FluvioSocket
impl !UnwindSafe for FluvioSocket
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