pub struct RawSocket<P> { /* private fields */ }
Expand description
Provides a raw-oriented socket.
Implementations§
Source§impl<P: Protocol> RawSocket<P>
impl<P: Protocol> RawSocket<P>
pub fn new(ctx: &IoContext, pro: P) -> Result<RawSocket<P>>
pub fn async_connect<F>(&mut self, ep: &P::Endpoint, handler: F) -> F::Output
pub fn async_receive<F>( &mut self, buf: &mut [u8], flags: i32, handler: F, ) -> F::Output
pub fn async_receive_from<F>( &mut self, buf: &mut [u8], flags: i32, handler: F, ) -> F::Output
pub fn async_send<F>(&mut self, buf: &[u8], flags: i32, handler: F) -> F::Output
pub fn async_send_to<F>( &mut self, buf: &[u8], flags: i32, ep: P::Endpoint, handler: F, ) -> F::Output
pub fn available(&self) -> Result<usize>
pub fn bind(&self, ep: &P::Endpoint) -> Result<()>
pub fn cancel(&mut self) -> &Self
pub fn connect(&self, ep: &P::Endpoint) -> Result<()>
pub fn get_non_blocking(&self) -> Result<bool>
pub fn get_option<C>(&self) -> Result<C>where
C: GetSocketOption<P>,
pub fn io_control<T>(&self, cmd: &mut T) -> Result<()>where
T: IoControl,
pub fn local_endpoint(&self) -> Result<P::Endpoint>
pub fn receive(&self, buf: &mut [u8], flags: i32) -> Result<usize>
pub fn receive_from( &self, buf: &mut [u8], flags: i32, ) -> Result<(usize, P::Endpoint)>
pub fn remote_endpoint(&self) -> Result<P::Endpoint>
pub fn send(&self, buf: &[u8], flags: i32) -> Result<usize>
pub fn send_to(&self, buf: &[u8], flags: i32, ep: P::Endpoint) -> Result<usize>
pub fn set_non_blocking(&self, on: bool) -> Result<()>
pub fn set_option<C>(&self, cmd: C) -> Result<()>where
C: SetSocketOption<P>,
pub fn shutdown(&self, how: Shutdown) -> Result<()>
Trait Implementations§
impl<P> Send for RawSocket<P>
Auto Trait Implementations§
impl<P> Freeze for RawSocket<P>where
P: Freeze,
impl<P> !RefUnwindSafe for RawSocket<P>
impl<P> !Sync for RawSocket<P>
impl<P> Unpin for RawSocket<P>where
P: Unpin,
impl<P> !UnwindSafe for RawSocket<P>
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