pub struct SocketLayer { /* private fields */ }Implementations§
source§impl SocketLayer
impl SocketLayer
pub fn local_addr(&self) -> SocketAddr
source§impl SocketLayer
impl SocketLayer
sourcepub async fn multi_connect(
&self,
addr: SocketAddr,
index_offset: usize,
) -> Result<RouteKey>
pub async fn multi_connect( &self, addr: SocketAddr, index_offset: usize, ) -> Result<RouteKey>
Multiple connections can be initiated to the target address.
sourcepub async fn connect(&self, addr: SocketAddr) -> Result<RouteKey>
pub async fn connect(&self, addr: SocketAddr) -> Result<RouteKey>
Initiate a connection.
sourcepub async fn connect_reuse_port(&self, addr: SocketAddr) -> Result<RouteKey>
pub async fn connect_reuse_port(&self, addr: SocketAddr) -> Result<RouteKey>
Reuse the bound port to initiate a connection, which can be used to penetrate NAT1 network type.
pub async fn connect_reuse_port_raw( &self, addr: SocketAddr, ) -> Result<TcpStream>
Auto Trait Implementations§
impl !Freeze for SocketLayer
impl !RefUnwindSafe for SocketLayer
impl Send for SocketLayer
impl Sync for SocketLayer
impl Unpin for SocketLayer
impl !UnwindSafe for SocketLayer
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