Struct bip_utracker::TrackerClient
[−]
[src]
pub struct TrackerClient { /* fields omitted */ }
Tracker client that executes requests asynchronously.
Client will shutdown on drop.
Methods
impl TrackerClient
[src]
fn new<H>(bind: SocketAddr, handshaker: H) -> Result<TrackerClient> where
H: Sink + DiscoveryInfo + Send + 'static,
H::SinkItem: From<Either<InitiateMessage, ClientMetadata>>,
[src]
H: Sink + DiscoveryInfo + Send + 'static,
H::SinkItem: From<Either<InitiateMessage, ClientMetadata>>,
Create a new TrackerClient.
fn with_capacity<H>(
bind: SocketAddr,
handshaker: H,
capacity: usize
) -> Result<TrackerClient> where
H: Sink + DiscoveryInfo + Send + 'static,
H::SinkItem: From<Either<InitiateMessage, ClientMetadata>>,
[src]
bind: SocketAddr,
handshaker: H,
capacity: usize
) -> Result<TrackerClient> where
H: Sink + DiscoveryInfo + Send + 'static,
H::SinkItem: From<Either<InitiateMessage, ClientMetadata>>,
Create a new TrackerClient with the given message capacity.
Panics if capacity == usize::max_value().
fn request(
&mut self,
addr: SocketAddr,
request: ClientRequest
) -> Option<ClientToken>
[src]
&mut self,
addr: SocketAddr,
request: ClientRequest
) -> Option<ClientToken>
Execute an asynchronous request to the given tracker.
If the maximum number of requests are currently in progress, return None.