var searchIndex = {}; searchIndex["bip_utracker"] = {"doc":"Library for parsing and writing UDP tracker messages.","items":[[8,"Handshaker","bip_utracker","Trait for providing a handshaker object with connection information.",null,null],[16,"Stream","","Type of stream used to receive connections from.",0,null],[10,"id","","Unique PeerId used to identify ourselves to other peers.",0,null],[10,"port","","Advertise port that is being listened on by the handshaker.",0,null],[10,"connect","","Initiates a handshake with the given socket address for the given InfoHash.",0,null],[10,"filter","","Adds a filter that is applied to handshakes before they are initiated or completed.",0,null],[10,"stream","","Stream that connections for the specified hash are sent to after they are successful.",0,null],[6,"InfoHash","","",null,null],[6,"PeerId","","",null,null],[3,"TrackerClient","","Tracker client that executes requests asynchronously.",null,null],[3,"ClientToken","","Associates a ClientRequest with a ClientResponse.",null,null],[3,"ClientResponses","","Responses received by a specific TrackerClient.",null,null],[3,"ClientResponsesIter","","Iterator over responses received by a specific TrackerClient.",null,null],[3,"TrackerServer","","Tracker server that executes responses asynchronously.",null,null],[4,"ClientRequest","","Request made by the TrackerClient.",null,null],[13,"Announce","","",1,null],[13,"Scrape","","",1,null],[4,"ClientResponse","","Response received by the TrackerClient.",null,null],[13,"Announce","","Announce response.",2,null],[13,"Scrape","","Scrape response.",2,null],[4,"ClientError","","Errors occuring as the result of a ClientRequest.",null,null],[13,"MaxTimeout","","Request timeout reached.",3,null],[13,"MaxLength","","Request length exceeded the packet length.",3,null],[13,"ClientShutdown","","Client shut down the request client.",3,null],[13,"ServerError","","Server sent us an invalid message.",3,null],[13,"IPVersionMismatch","","Requested to send from IPv4 to IPv6 or vice versa.",3,null],[13,"ServerMessage","","Server returned an error message.",3,null],[0,"request","","Messaging primitives for requests.",null,null],[3,"TrackerRequest","bip_utracker::request","TrackerRequest which encapsulates any request sent to a tracker.",null,null],[4,"RequestType","","Enumerates all types of requests that can be made to a tracker.",null,null],[13,"Connect","","",4,null],[13,"Announce","","",4,null],[13,"Scrape","","",4,null],[17,"CONNECT_ID_PROTOCOL_ID","","Global connection id for connect requests.",null,null],[11,"to_owned","","Create an owned version of the RequestType.",4,null],[11,"new","","Create a new TrackerRequest.",5,{"inputs":[{"name":"u64"},{"name":"u32"},{"name":"requesttype"}],"output":{"name":"trackerrequest"}}],[11,"from_bytes","","Create a new TrackerRequest from the given bytes.",5,null],[11,"write_bytes","","Write the TrackerRequest to the given writer.",5,null],[11,"connection_id","","Connection ID supplied with a request to validate the senders address.",5,null],[11,"transaction_id","","Transaction ID supplied with a request to uniquely identify a response.",5,null],[11,"request_type","","Actual type of request that this TrackerRequest represents.",5,null],[11,"to_owned","","Create an owned version of the TrackerRequest.",5,null],[0,"response","bip_utracker","Messaging primitives for responses.",null,null],[3,"TrackerResponse","bip_utracker::response","TrackerResponse which encapsulates any response sent from a tracker.",null,null],[4,"ResponseType","","Enumerates all types of responses that can be received from a tracker.",null,null],[13,"Connect","","",6,null],[13,"Announce","","",6,null],[13,"Scrape","","",6,null],[13,"Error","","",6,null],[11,"to_owned","","Create an owned version of the ResponseType.",6,null],[11,"new","","Create a new TrackerResponse.",7,{"inputs":[{"name":"u32"},{"name":"responsetype"}],"output":{"name":"trackerresponse"}}],[11,"from_bytes","","Create a new TrackerResponse from the given bytes.",7,null],[11,"write_bytes","","Write the TrackerResponse to the given writer.",7,null],[11,"transaction_id","","Transaction ID supplied with a response to uniquely identify a request.",7,null],[11,"response_type","","Actual type of response that this TrackerResponse represents.",7,null],[11,"to_owned","","Create an owned version of the TrackerResponse.",7,null],[0,"announce","bip_utracker","Messaging primitives for announcing.",null,null],[3,"AnnounceRequest","bip_utracker::announce","Announce request sent from the client to the server.",null,null],[3,"AnnounceResponse","","Announce response sent from the server to the client.",null,null],[3,"ClientState","","Announce state of a client reported to the server.",null,null],[4,"AnnounceEvent","","Announce event of a client reported to the server.",null,null],[13,"None","","No event is reported.",8,null],[13,"Completed","","Torrent download has completed.",8,null],[13,"Started","","Torrent download has started.",8,null],[13,"Stopped","","Torrent download has stopped.",8,null],[4,"SourceIP","","Client specified IP address to send the response to.",null,null],[13,"ImpliedV4","","Infer the IPv4 address from the sender address.",9,null],[13,"ExplicitV4","","Send the response to the given IPv4 address.",9,null],[13,"ImpliedV6","","Infer the IPv6 address from the sender address.",9,null],[13,"ExplicitV6","","Send the response to the given IPv6 address.",9,null],[4,"DesiredPeers","","Client desired number of peers to send in the response.",null,null],[13,"Default","","Send the default number of peers.",10,null],[13,"Specified","","Send a specific number of peers.",10,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"fmt","","",11,null],[11,"clone","","",11,null],[11,"new","","Create a new AnnounceRequest.",11,{"inputs":[{"name":"infohash"},{"name":"peerid"},{"name":"clientstate"},{"name":"sourceip"},{"name":"u32"},{"name":"desiredpeers"},{"name":"u16"},{"name":"announceoptions"}],"output":{"name":"announcerequest"}}],[11,"from_bytes_v4","","Construct an IPv4 AnnounceRequest from the given bytes.",11,null],[11,"from_bytes_v6","","Construct an IPv6 AnnounceRequest from the given bytes.",11,null],[11,"write_bytes","","Write the AnnounceRequest to the given writer.",11,null],[11,"info_hash","","InfoHash of the current request.",11,null],[11,"peer_id","","PeerId of the current request.",11,null],[11,"state","","State reported by the client in the given request.",11,null],[11,"source_ip","","Source address to send the response to.",11,null],[11,"key","","Unique key randomized by the client that the server can use.",11,null],[11,"num_want","","Number of peers desired by the client.",11,null],[11,"port","","Port to send the response to.",11,null],[11,"options","","Set of AnnounceOptions supplied in the request.",11,null],[11,"to_owned","","Create an owned version of AnnounceRequest.",11,null],[11,"eq","","",12,null],[11,"ne","","",12,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"new","","Create a new AnnounceResponse",12,{"inputs":[{"name":"i32"},{"name":"i32"},{"name":"i32"},{"name":"compactpeers"}],"output":{"name":"announceresponse"}}],[11,"from_bytes_v4","","Construct an IPv4 AnnounceResponse from the given bytes.",12,null],[11,"from_bytes_v6","","Construct an IPv6 AnnounceResponse from the given bytes.",12,null],[11,"write_bytes","","Write the AnnounceResponse to the given writer.",12,null],[11,"interval","","Interval in seconds that clients should wait before re-announcing.",12,null],[11,"leechers","","Number of leechers the tracker knows about for the torrent.",12,null],[11,"seeders","","Number of seeders the tracker knows about for the torrent.",12,null],[11,"peers","","Peers the tracker knows about that are sharing the torrent.",12,null],[11,"to_owned","","Create an owned version of AnnounceResponse.",12,null],[11,"clone","","",13,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"fmt","","",13,null],[11,"new","","Create a new ClientState.",13,{"inputs":[{"name":"i64"},{"name":"i64"},{"name":"i64"},{"name":"announceevent"}],"output":{"name":"clientstate"}}],[11,"from_bytes","","Construct the ClientState from the given bytes.",13,null],[11,"write_bytes","","Write the ClientState to the given writer.",13,null],[11,"event","","Event reported by the client.",13,null],[11,"bytes_left","","Bytes left to be downloaded.",13,null],[11,"bytes_uploaded","","Bytes already uploaded.",13,null],[11,"bytes_downloaded","","Bytes already downloaded.",13,null],[11,"eq","","",8,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"from_bytes","","Construct an AnnounceEvent from the given bytes.",8,null],[11,"write_bytes","","Write the AnnounceEvent to the given writer.",8,null],[11,"as_id","","Access the raw id of the current event.",8,null],[11,"clone","","",9,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"fmt","","",9,null],[11,"from_bytes_v4","","Construct the IPv4 SourceIP from the given bytes.",9,null],[11,"from_bytes_v6","","Construct the IPv6 SourceIP from the given bytes.",9,null],[11,"write_bytes","","Write the SourceIP to the given writer.",9,null],[11,"is_ipv6","","Whether or not the source is an IPv6 address.",9,null],[11,"is_ipv4","","Whether or not the source is an IPv4 address.",9,null],[11,"clone","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"fmt","","",10,null],[11,"from_bytes","","Construct the DesiredPeers from the given bytes.",10,null],[11,"write_bytes","","Write the DesiredPeers to the given writer.",10,null],[0,"contact","bip_utracker","Messaging primitives for contact information.",null,null],[3,"CompactPeersIter","bip_utracker::contact","Iterator over the SocketAddr info for some peers.",null,null],[3,"CompactPeersV4","","Container for IPv4 peers to be sent/received from a tracker.",null,null],[3,"CompactPeersV4Iter","","Iterator over the SocketAddrV4 info for some peers.",null,null],[3,"CompactPeersV6","","Container for IPv6 peers to be sent/received from a tracker.",null,null],[3,"CompactPeersV6Iter","","Iterator over the SocketAddrV6 info for some peers.",null,null],[4,"CompactPeers","","Container for peers to be sent/received from a tracker.",null,null],[13,"V4","","IPv4 variant of CompactPeers.",14,null],[13,"V6","","IPv6 variant of CompactPeers.",14,null],[11,"eq","","",14,null],[11,"ne","","",14,null],[11,"fmt","","",14,null],[11,"clone","","",14,null],[11,"from_bytes_v4","","Construct a CompactPeers::V4 from the given bytes.",14,null],[11,"from_bytes_v6","","Construct a CompactPeers::V6 from the given bytes.",14,null],[11,"write_bytes","","Write the underlying CompactPeers to the given writer.",14,null],[11,"iter","","Iterator over all of the contact information.",14,null],[11,"to_owned","","Create an owned version of CompactPeers.",14,null],[11,"eq","","",15,null],[11,"ne","","",15,null],[11,"fmt","","",15,null],[11,"clone","","",15,null],[11,"next","","",15,null],[11,"eq","","",16,null],[11,"ne","","",16,null],[11,"fmt","","",16,null],[11,"clone","","",16,null],[11,"new","","Create a new CompactPeersV4.",16,{"inputs":[],"output":{"name":"compactpeersv4"}}],[11,"from_bytes","","Construct a CompactPeersV4 from the given bytes.",16,null],[11,"write_bytes","","Write the CompactPeersV4 to the given writer.",16,null],[11,"insert","","Add the given peer to the list of peers.",16,null],[11,"iter","","Iterator over all of the contact information.",16,null],[11,"to_owned","","Create an owned version of CompactPeersV4.",16,null],[11,"eq","","",17,null],[11,"ne","","",17,null],[11,"fmt","","",17,null],[11,"clone","","",17,null],[11,"next","","",17,null],[11,"eq","","",18,null],[11,"ne","","",18,null],[11,"fmt","","",18,null],[11,"clone","","",18,null],[11,"new","","Create a new CompactPeersV6.",18,{"inputs":[],"output":{"name":"compactpeersv6"}}],[11,"from_bytes","","Construct a CompactPeersV6 from the given bytes.",18,null],[11,"write_bytes","","Write the CompactPeersV6 to the given writer.",18,null],[11,"insert","","Add the given peer to the list of peers.",18,null],[11,"iter","","Iterator over all of the contact information.",18,null],[11,"to_owned","","Create an owned version of CompactPeersV6.",18,null],[11,"eq","","",19,null],[11,"ne","","",19,null],[11,"fmt","","",19,null],[11,"clone","","",19,null],[11,"next","","",19,null],[0,"error","bip_utracker","Messaging primitives for server errors.",null,null],[3,"ErrorResponse","bip_utracker::error","Error reported by the server and sent to the client.",null,null],[11,"eq","","",20,null],[11,"ne","","",20,null],[11,"clone","","",20,null],[11,"fmt","","",20,null],[11,"new","","Create a new ErrorResponse.",20,{"inputs":[{"name":"str"}],"output":{"name":"errorresponse"}}],[11,"from_bytes","","Construct an ErrorResponse from the given bytes.",20,null],[11,"write_bytes","","Write the ErrorResponse to the given writer.",20,null],[11,"message","","Message describing the error that occured.",20,null],[11,"to_owned","","Create an owned version of the ErrorResponse.",20,null],[0,"option","bip_utracker","Messaging primitives for announce options.",null,null],[3,"AnnounceOptions","bip_utracker::option","Set of announce options used to provide trackers with extra information.",null,null],[3,"URLDataOption","","Concatenated PATH and QUERY of a UDP tracker URL.",null,null],[8,"AnnounceOption","","Trait for supplying optional information in an AnnounceRequest.",null,null],[10,"option_byte","","Byte specifying what option this is.",21,{"inputs":[],"output":{"name":"u8"}}],[10,"option_length","","Length of the associated option data.",21,null],[10,"read_option","","Reads the option content from the given bytes.",21,null],[10,"write_option","","Writes the option payload into the given buffer.",21,null],[11,"eq","","",22,null],[11,"ne","","",22,null],[11,"fmt","","",22,null],[11,"clone","","",22,null],[11,"new","","Create a new set of AnnounceOptions.",22,{"inputs":[],"output":{"name":"announceoptions"}}],[11,"from_bytes","","Parse a set of AnnounceOptions from the given bytes.",22,null],[11,"write_bytes","","Write the AnnounceOptions to the given writer.",22,null],[11,"get","","Search for and construct the given AnnounceOption from the current AnnounceOptions.",22,null],[11,"insert","","Add an AnnounceOption to the current set of AnnounceOptions.",22,null],[11,"to_owned","","Create an owned version of AnnounceOptions.",22,null],[11,"clone","","",23,null],[11,"eq","","",23,null],[11,"ne","","",23,null],[11,"fmt","","",23,null],[11,"new","","Create a new URLDataOption from the given bytes.",23,null],[11,"option_byte","","",23,{"inputs":[],"output":{"name":"u8"}}],[11,"option_length","","",23,null],[11,"read_option","","",23,null],[11,"write_option","","",23,null],[0,"scrape","bip_utracker","Messaging primitives for scraping.",null,null],[3,"ScrapeStats","bip_utracker::scrape","Status for a given InfoHash.",null,null],[3,"ScrapeRequest","","Scrape request sent from the client to the server.",null,null],[3,"ScrapeResponse","","Scrape response sent from the server to the client.",null,null],[3,"ScrapeRequestIter","","Iterator over a number of InfoHashes.",null,null],[3,"ScrapeResponseIter","","Iterator over a number of ScrapeStats.",null,null],[11,"eq","","",24,null],[11,"ne","","",24,null],[11,"fmt","","",24,null],[11,"clone","","",24,null],[11,"new","","Create a new ScrapeStats.",24,{"inputs":[{"name":"i32"},{"name":"i32"},{"name":"i32"}],"output":{"name":"scrapestats"}}],[11,"num_seeders","","Current number of seeders.",24,null],[11,"num_downloads","","Number of times it has been downloaded.",24,null],[11,"num_leechers","","Current number of leechers.",24,null],[11,"eq","","",25,null],[11,"ne","","",25,null],[11,"fmt","","",25,null],[11,"clone","","",25,null],[11,"new","","Create a new ScrapeRequest.",25,{"inputs":[],"output":{"name":"scraperequest"}}],[11,"from_bytes","","Construct a ScrapeRequest from the given bytes.",25,null],[11,"write_bytes","","Write the ScrapeRequest to the given writer.",25,null],[11,"insert","","Add the InfoHash to the current request.",25,null],[11,"iter","","Iterator over all of the hashes in the request.",25,null],[11,"to_owned","","Create an owned version of ScrapeRequest.",25,null],[11,"eq","","",26,null],[11,"ne","","",26,null],[11,"fmt","","",26,null],[11,"clone","","",26,null],[11,"new","","Create a new ScrapeResponse.",26,{"inputs":[],"output":{"name":"scraperesponse"}}],[11,"from_bytes","","Construct a ScrapeResponse from the given bytes.",26,null],[11,"write_bytes","","Write the ScrapeResponse to the given writer.",26,null],[11,"insert","","Add the scrape statistics to the current response.",26,null],[11,"iter","","Iterator over each status for every InfoHash in the request.",26,null],[11,"to_owned","","Create an owned version of ScrapeResponse.",26,null],[11,"eq","","",27,null],[11,"ne","","",27,null],[11,"fmt","","",27,null],[11,"clone","","",27,null],[11,"next","","",27,null],[11,"len","","",27,null],[11,"eq","","",28,null],[11,"ne","","",28,null],[11,"fmt","","",28,null],[11,"clone","","",28,null],[11,"next","","",28,null],[11,"len","","",28,null],[11,"eq","bip_utracker","",3,null],[11,"ne","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"fmt","","",29,null],[11,"hash","","",29,null],[11,"eq","","",29,null],[11,"ne","","",29,null],[11,"clone","","",29,null],[11,"recv","","Blocks until a value is received or the TrackerClient shuts down.",29,null],[11,"iter","","Iterator over the responses produced by the TrackerClient.",29,null],[11,"into_iter","","",29,null],[11,"fmt","","",30,null],[11,"hash","","",30,null],[11,"eq","","",30,null],[11,"ne","","",30,null],[11,"clone","","",30,null],[11,"next","","",30,null],[11,"fmt","","",1,null],[11,"fmt","","",2,null],[11,"announce_response","","Optionally return a reference to the underyling AnnounceResponse.",2,null],[11,"scrape_response","","Optionally return a reference to the underyling ScrapeResponse.",2,null],[11,"new","","Create a new TrackerClient.",31,{"inputs":[{"name":"socketaddr"},{"name":"h"}],"output":{"name":"result"}}],[11,"with_capacity","","Create a new TrackerClient with the given message capacity.",31,{"inputs":[{"name":"socketaddr"},{"name":"h"},{"name":"usize"}],"output":{"name":"result"}}],[11,"request","","Execute an asynchronous request to the given tracker.",31,null],[11,"responses","","Channel that receives the responses from the trackers queried.",31,null],[11,"drop","","",31,null],[11,"hash","","",32,null],[11,"eq","","",32,null],[11,"ne","","",32,null],[11,"fmt","","",32,null],[11,"clone","","",32,null],[11,"run","","Run a new TrackerServer.",33,{"inputs":[{"name":"socketaddr"},{"name":"h"}],"output":{"name":"result"}}],[11,"drop","","",33,null],[6,"ClientResult","","Result type for a ClientRequest.",null,null],[6,"ServerResult","","Result type for a ServerHandler.",null,null],[8,"ServerHandler","","Trait for providing a TrackerServer with methods to service TrackerReqeusts.",null,null],[10,"connect","","Service a connection id request from the given address.",34,null],[10,"announce","","Service an announce request with the given connect id.",34,null],[10,"scrape","","Service a scrape request with the given connect id.",34,null]],"paths":[[8,"Handshaker"],[4,"ClientRequest"],[4,"ClientResponse"],[4,"ClientError"],[4,"RequestType"],[3,"TrackerRequest"],[4,"ResponseType"],[3,"TrackerResponse"],[4,"AnnounceEvent"],[4,"SourceIP"],[4,"DesiredPeers"],[3,"AnnounceRequest"],[3,"AnnounceResponse"],[3,"ClientState"],[4,"CompactPeers"],[3,"CompactPeersIter"],[3,"CompactPeersV4"],[3,"CompactPeersV4Iter"],[3,"CompactPeersV6"],[3,"CompactPeersV6Iter"],[3,"ErrorResponse"],[8,"AnnounceOption"],[3,"AnnounceOptions"],[3,"URLDataOption"],[3,"ScrapeStats"],[3,"ScrapeRequest"],[3,"ScrapeResponse"],[3,"ScrapeRequestIter"],[3,"ScrapeResponseIter"],[3,"ClientResponses"],[3,"ClientResponsesIter"],[3,"TrackerClient"],[3,"ClientToken"],[3,"TrackerServer"],[8,"ServerHandler"]]}; initSearch(searchIndex);