pub struct TcpSocket { /* private fields */ }Implementations§
Source§impl TcpSocket
impl TcpSocket
pub async fn with<F, R>(&self, f: F) -> R
pub async fn with_mutable<F, R>(&self, f: F) -> R
pub fn poll_with<F, R>(&self, context: &mut Context<'_>, f: F) -> Poll<R>
pub fn poll_with_mutable<F, R>( &self, context: &mut Context<'_>, f: F, ) -> Poll<R>
pub async fn set_timeout(&mut self, timeout: Option<Duration>)
pub async fn accept( &mut self, address: Option<impl Into<IpAddress>>, port: impl Into<Port>, ) -> Result<()>
pub async fn connect( &mut self, address: impl Into<IpAddress>, port: impl Into<Port>, ) -> Result<()>
pub async fn read(&mut self, buffer: &mut [u8]) -> Result<usize>
pub async fn write(&mut self, buffer: &[u8]) -> Result<usize>
pub async fn flush(&mut self) -> Result<()>
pub async fn close(&mut self)
pub async fn close_forced(&mut self)
pub async fn get_read_capacity(&self) -> usize
pub async fn get_write_capacity(&self) -> usize
pub async fn get_write_queue_size(&self) -> usize
pub async fn get_read_queue_size(&self) -> usize
pub async fn get_local_endpoint(&self) -> Result<Option<(IpAddress, Port)>>
pub async fn get_remote_endpoint(&self) -> Result<Option<(IpAddress, Port)>>
pub async fn set_keep_alive(&mut self, keep_alive: Option<Duration>)
pub async fn set_hop_limit(&mut self, hop_limit: Option<u8>)
pub async fn can_read(&self) -> bool
pub async fn can_write(&self) -> bool
pub async fn may_read(&self) -> bool
pub async fn may_write(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpSocket
impl !RefUnwindSafe for TcpSocket
impl Send for TcpSocket
impl Sync for TcpSocket
impl Unpin for TcpSocket
impl !UnwindSafe for TcpSocket
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