Struct embassy_net::tcp::client::TcpClient
source · pub struct TcpClient<'d, D: Driver, const N: usize, const TX_SZ: usize = 1024, const RX_SZ: usize = 1024> { /* private fields */ }
Expand description
TCP client connection pool compatible with embedded-nal-async
traits.
The pool is capable of managing up to N concurrent connections with tx and rx buffers according to TX_SZ and RX_SZ.
Implementations§
Trait Implementations§
source§impl<'d, D: Driver, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnect for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D: Driver, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnect for TcpClient<'d, D, N, TX_SZ, RX_SZ>
§type Connection<'m> = TcpConnection<'m, N, TX_SZ, RX_SZ>
where
Self: 'm
type Connection<'m> = TcpConnection<'m, N, TX_SZ, RX_SZ> where Self: 'm
Type holding state of a TCP connection. Should close the connection when dropped.
source§async fn connect<'a>(
&'a self,
remote: SocketAddr
) -> Result<Self::Connection<'a>, Self::Error>
async fn connect<'a>( &'a self, remote: SocketAddr ) -> Result<Self::Connection<'a>, Self::Error>
Connect to the given remote host and port. Read more
Auto Trait Implementations§
impl<'d, D, const N: usize, const TX_SZ: usize, const RX_SZ: usize> Freeze for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D, const N: usize, const TX_SZ: usize = 1024, const RX_SZ: usize = 1024> !RefUnwindSafe for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D, const N: usize, const TX_SZ: usize = 1024, const RX_SZ: usize = 1024> !Send for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D, const N: usize, const TX_SZ: usize = 1024, const RX_SZ: usize = 1024> !Sync for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D, const N: usize, const TX_SZ: usize, const RX_SZ: usize> Unpin for TcpClient<'d, D, N, TX_SZ, RX_SZ>
impl<'d, D, const N: usize, const TX_SZ: usize = 1024, const RX_SZ: usize = 1024> !UnwindSafe for TcpClient<'d, D, N, TX_SZ, RX_SZ>
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