Struct tor_proto::circuit::ClientCirc [−][src]
pub struct ClientCirc { /* fields omitted */ }Expand description
A circuit that we have constructed over the Tor network.
Implementations
pub async fn extend_ntor<R, Tg>(
&self,
rng: &mut R,
target: &Tg,
params: &CircParameters
) -> Result<()> where
R: Rng + CryptoRng,
Tg: CircTarget,
pub async fn extend_ntor<R, Tg>(
&self,
rng: &mut R,
target: &Tg,
params: &CircParameters
) -> Result<()> where
R: Rng + CryptoRng,
Tg: CircTarget,
Extend the circuit via the ntor handshake to a new target last hop.
The same caveats apply from extend_impl.
pub async fn begin_stream(
self: Arc<Self>,
target: &str,
port: u16,
flags: Option<IpVersionPreference>
) -> Result<DataStream>
pub async fn begin_stream(
self: Arc<Self>,
target: &str,
port: u16,
flags: Option<IpVersionPreference>
) -> Result<DataStream>
Start a stream to the given address and port, using a BEGIN cell.
The use of a string for the address is intentional: you should let the remote Tor relay do the hostname lookup for you.
Start a new stream to the last relay in the circuit, using a BEGIN_DIR cell.
Perform a DNS lookup, using a RESOLVE cell with the last relay in this circuit.
Note that this function does not check for timeouts; that’s the caller’s responsibility.
Perform a reverse DNS lookup, by sending a RESOLVE cell with the last relay on this circuit.
Note that this function does not check for timeouts; that’s the caller’s responsibility.
Shut down this circuit immediately, along with all streams that are using it.
Note that other references to this circuit may exist. If they do, they will stop working after you call this function.
It’s not necessary to call this method if you’re just done with a circuit: the channel should close on its own once nothing is using it any more.
Return true if this circuit is closed and therefore unusable.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ClientCirc
impl Send for ClientCirc
impl Sync for ClientCirc
impl Unpin for ClientCirc
impl !UnwindSafe for ClientCirc
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more