Trait asio::SendToRecvFrom
[−]
[src]
pub trait SendToRecvFrom: Socket + Cancel { fn send_to<T: IoObject>(&self, io: &T, buf: &[u8], flags: i32, ep: &Self::Endpoint) -> Result<usize>; fn async_send_to<A, F, T>(a: A, flags: i32, ep: &Self::Endpoint, callback: F, obj: &Strand<T>) where A: Fn(&T) -> (&Self, &[u8]) + Send, F: FnOnce(Strand<T>, Result<usize>) + Send; fn recv_from<T: IoObject>(&self, io: &T, buf: &mut [u8], flags: i32) -> Result<(usize, Self::Endpoint)>; fn async_recv_from<A, F, T>(a: A, flags: i32, callback: F, obj: &Strand<T>) where A: Fn(&mut T) -> (&Self, &mut [u8]) + Send, F: FnOnce(Strand<T>, Result<(usize, Self::Endpoint)>) + Send; }
Required Methods
fn send_to<T: IoObject>(&self, io: &T, buf: &[u8], flags: i32, ep: &Self::Endpoint) -> Result<usize>
fn async_send_to<A, F, T>(a: A, flags: i32, ep: &Self::Endpoint, callback: F, obj: &Strand<T>) where A: Fn(&T) -> (&Self, &[u8]) + Send, F: FnOnce(Strand<T>, Result<usize>) + Send
fn recv_from<T: IoObject>(&self, io: &T, buf: &mut [u8], flags: i32) -> Result<(usize, Self::Endpoint)>
fn async_recv_from<A, F, T>(a: A, flags: i32, callback: F, obj: &Strand<T>) where A: Fn(&mut T) -> (&Self, &mut [u8]) + Send, F: FnOnce(Strand<T>, Result<(usize, Self::Endpoint)>) + Send
Implementors
impl SendToRecvFrom for LocalDgramSocket
impl SendToRecvFrom for UdpSocket
impl SendToRecvFrom for IcmpSocket