[−][src]Struct ninat::Datagram
Represents an UDP datagram, containing a TCP stream keeping the SOCKS proxy alive and an UDP socket sending and receiving data.
Implementations
impl Datagram
[src]
pub fn bind(
proxy: SocketAddrV4,
addr: SocketAddrV4,
auth: Option<(String, String)>
) -> Result<Datagram>
[src]
proxy: SocketAddrV4,
addr: SocketAddrV4,
auth: Option<(String, String)>
) -> Result<Datagram>
Creates a new Datagram
.
Trait Implementations
impl Debug for Datagram
[src]
impl RW for Datagram
[src]
fn local_addr(&self) -> Result<SocketAddrV4>
[src]
fn send_to(&self, buf: &[u8], addr: SocketAddrV4) -> Result<usize>
[src]
fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddrV4)>
[src]
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn read_timeout(&self) -> Result<Option<Duration>>
[src]
fn write_timeout(&self) -> Result<Option<Duration>>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Datagram
impl Send for Datagram
impl Sync for Datagram
impl Unpin for Datagram
impl UnwindSafe for Datagram
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,