pub struct TcpTransport {
pub socket_opts: SocketOpts,
pub cfg: TcpConfig,
}Fields§
§socket_opts: SocketOpts§cfg: TcpConfigTrait Implementations§
Source§impl Debug for TcpTransport
impl Debug for TcpTransport
Source§impl Transport for TcpTransport
impl Transport for TcpTransport
type Acceptor = Listener
type Stream = TcpStream
type RawStream = Stream
fn new(config: &TransportConfig) -> Result<Self>
Source§fn as_raw_fd(conn: &Self::Stream) -> RawFd
fn as_raw_fd(conn: &Self::Stream) -> RawFd
Get the stream id, which is used to identify the transport layer
Source§fn hint(conn: &Self::Stream, opt: SocketOpts)
fn hint(conn: &Self::Stream, opt: SocketOpts)
Provide the transport with socket options, which can be handled at the need of the transport
fn bind<'life0, 'async_trait>(
&'life0 self,
addr: NamedSocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Acceptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn accept<'life0, 'life1, 'async_trait>(
&'life0 self,
a: &'life1 Self::Acceptor,
) -> Pin<Box<dyn Future<Output = Result<(Self::RawStream, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn accept<'life0, 'life1, 'async_trait>(
&'life0 self,
a: &'life1 Self::Acceptor,
) -> Pin<Box<dyn Future<Output = Result<(Self::RawStream, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
accept must be cancel safe
fn handshake<'life0, 'async_trait>(
&'life0 self,
conn: Self::RawStream,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 AddrMaybeCached,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_header(&self, _name: &str) -> Option<String>
Auto Trait Implementations§
impl Freeze for TcpTransport
impl RefUnwindSafe for TcpTransport
impl Send for TcpTransport
impl Sync for TcpTransport
impl Unpin for TcpTransport
impl UnsafeUnpin for TcpTransport
impl UnwindSafe for TcpTransport
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