pub struct SocksUdpSocket { /* private fields */ }Expand description
A UDP socket that is associated through a SOCKS proxy.
Implementations§
Source§impl SocksUdpSocket
impl SocksUdpSocket
Sourcepub fn new(socket: UdpSocket, stream: TcpStream, addr: SocketAddr) -> Self
pub fn new(socket: UdpSocket, stream: TcpStream, addr: SocketAddr) -> Self
Sourcepub fn get_proxy_udp_addr(&mut self) -> SocketAddr
pub fn get_proxy_udp_addr(&mut self) -> SocketAddr
Sourcepub async fn send_udp_data(
&self,
buf: &[u8],
target_addr: &str,
) -> Result<usize, SocksError>
pub async fn send_udp_data( &self, buf: &[u8], target_addr: &str, ) -> Result<usize, SocksError>
Sourcepub async fn recv_udp_data(
&self,
tm: u64,
) -> Result<(SocketAddr, Vec<u8>), SocksError>
pub async fn recv_udp_data( &self, tm: u64, ) -> Result<(SocketAddr, Vec<u8>), SocksError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SocksUdpSocket
impl RefUnwindSafe for SocksUdpSocket
impl Send for SocksUdpSocket
impl Sync for SocksUdpSocket
impl Unpin for SocksUdpSocket
impl UnwindSafe for SocksUdpSocket
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