[−][src]Trait mssql_browser::custom_socket::UdpSocket
A generic contract for an UDP socket. Used to be agnostic of the underlying async framework used.
Associated Types
Loading content...Required methods
#[must_use]fn enable_broadcast<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
When enabled, this socket is allowed to send packets to a broadcast address.
#[must_use]fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Connects the UDP socket setting to default destination for send() and limiting packets
that are read via recv from the address specified in addr
.
#[must_use]fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends data on the socket to the remote address to which it is connected. On success, returns the number of bytes written.
#[must_use]fn send_to<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends data on the socket to the given address. On success, returns the number of bytes written.
#[must_use]fn recv<'life0, 'life1, 'async_trait>(
&'life0 mut self,
but: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
but: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Receives a single datagram on the socket from the remote address to which it is connected. On success, returns the number of bytes read.
#[must_use]fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Receives a single datagram on the socket. On success, returns the number of bytes read and the origin.
Implementations on Foreign Types
impl UdpSocket for UdpSocket
[src]
type Error = Error
fn enable_broadcast<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send_to<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn recv<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl UdpSocket for UdpSocket
[src]
type Error = Error
fn enable_broadcast<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send_to<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 [u8],
addr: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn recv<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,