pub struct RemoteTcpListener { /* private fields */ }Expand description
TCP listener implemented with the two-stage SOCKS BIND command.
Implementations§
Source§impl RemoteTcpListener
impl RemoteTcpListener
Sourcepub const fn local_addr(&self) -> &SocksAddress
pub const fn local_addr(&self) -> &SocksAddress
Address assigned by the RemoteSocks proxy after the first BIND reply.
Sourcepub async fn accept(&self) -> Result<RemoteTcpStream, Error>
pub async fn accept(&self) -> Result<RemoteTcpStream, Error>
Wait for the second BIND reply and return the accepted proxy stream.
Further calls issue another BIND request using the assigned local address, matching the reusable listener behavior of the official SDK.
§Errors
Returns endpoint resolution, connection, negotiation, or BIND reply errors.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RemoteTcpListener
impl !RefUnwindSafe for RemoteTcpListener
impl !UnwindSafe for RemoteTcpListener
impl Send for RemoteTcpListener
impl Sync for RemoteTcpListener
impl Unpin for RemoteTcpListener
impl UnsafeUnpin for RemoteTcpListener
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request