_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c22000
train
// Unmarshal the bencode value in the 'data' to a value pointed by the 'v' // pointer, return a non-nil error if any.
{ "resource": "" }
c22001
train
// Don't wait for pieces to complete and be verified. Read calls return as // soon as they can when the underlying chunks become available.
{ "resource": "" }
c22002
train
// Configure the number of bytes ahead of a read that should also be // prioritized in preparation for further reads.
{ "resource": "" }
c22003
train
// How many bytes are available to read. Max is the most we could require.
{ "resource": "" }
c22004
train
// Calculates the pieces this reader wants downloaded, ignoring the cached // value at r.pieces.
{ "resource": "" }
c22005
train
// Wait until some data should be available to read. Tickles the client if it // isn't. Returns how much should be readable without blocking.
{ "resource": "" }
c22006
train
// Performs at most one successful read to torrent storage.
{ "resource": "" }
c22007
train
// body is the binary serializable request body. trailer is optional data // following it, such as for BEP 41.
{ "resource": "" }
c22008
train
// args is the binary serializable request body. trailer is optional data // following it, such as for BEP 41.
{ "resource": "" }
c22009
train
// The size in bytes of a metadata extension piece.
{ "resource": "" }
c22010
train
// Return the request that would include the given offset into the torrent data.
{ "resource": "" }
c22011
train
// ih is nil if we expect the peer to declare the InfoHash, such as when the // peer initiated the connection. Returns ok if the Handshake was successful, // and err if there was an unexpected condition other than the peer simply // abandoning the Handshake.
{ "resource": "" }
c22012
train
// reads data writing it to 'd.buf' until 'sep' byte is encountered, 'sep' byte // is consumed, but not included into the 'd.buf'
{ "resource": "" }
c22013
train
// called when 'i' was consumed
{ "resource": "" }
c22014
train
// Returns specifics for parsing a dict field value.
{ "resource": "" }
c22015
train
// An unknown bencode type character was encountered.
{ "resource": "" }
c22016
train
// Return how long to wait before trying again. For most errors, we return 5 // minutes, a relatively quick turn around for DNS changes.
{ "resource": "" }
c22017
train
// Returns the last, inclusive IP in a net.IPNet.
{ "resource": "" }
c22018
train
// Returns true if the value implements Marshaler interface and marshaling was // done successfully.
{ "resource": "" }
c22019
train
// The relative file path for a multi-file torrent, and the torrent name for a // single-file torrent.
{ "resource": "" }
c22020
train
// Returns the state of pieces in this file.
{ "resource": "" }
c22021
train
// Sets the minimum priority for pieces in the File.
{ "resource": "" }
c22022
train
// Returns the priority per File.SetPriority.
{ "resource": "" }
c22023
train
// Writes out a human readable status of the client, such as for writing to a // HTTP status page.
{ "resource": "" }
c22024
train
// Stops the client. All connections to peers are closed and all activity will // come to a halt.
{ "resource": "" }
c22025
train
// Returns a handle to the given torrent, if it's present in the client.
{ "resource": "" }
c22026
train
// Returns whether an address is known to connect to a client with our own ID.
{ "resource": "" }
c22027
train
// Returns a connection over UTP or TCP, whichever is first to connect.
{ "resource": "" }
c22028
train
// Called to dial out and run a connection. The addr we're given is already // considered half-open.
{ "resource": "" }
c22029
train
// Calls f with any secret keys.
{ "resource": "" }
c22030
train
// Do encryption and bittorrent handshakes as receiver.
{ "resource": "" }
c22031
train
// Returns !ok if handshake failed for valid reasons.
{ "resource": "" }
c22032
train
// See the order given in Transmission's tr_peerMsgsNew.
{ "resource": "" }
c22033
train
// Process incoming ut_metadata message.
{ "resource": "" }
c22034
train
// Return a Torrent ready for insertion into a Client.
{ "resource": "" }
c22035
train
// Adds a torrent by InfoHash with a custom Storage implementation. // If the torrent already exists then this Storage is ignored and the // existing torrent returned with `new` set to `false`
{ "resource": "" }
c22036
train
// Returns true when all torrents are completely downloaded and false if the // client is stopped before that.
{ "resource": "" }
c22037
train
// Returns handles to all the torrents loaded in the Client.
{ "resource": "" }
c22038
train
// Our IP as a peer should see it.
{ "resource": "" }
c22039
train
// Calculate, and send Y, our public key.
{ "resource": "" }
c22040
train
// Looking for b at the end of a.
{ "resource": "" }
c22041
train
// Reads from r until b has been seen. Keeps the minimum amount of data in // memory.
{ "resource": "" }
c22042
train
// Set from the non-compact form in BEP 3.
{ "resource": "" }
c22043
train
// Whether the AnnounceList should be preferred over a single URL announce.
{ "resource": "" }
c22044
train
// Returns true if a peer is replaced.
{ "resource": "" }
c22045
train
// The Default path maker just returns the current path
{ "resource": "" }
c22046
train
// Allows passing a function to determine the path for storing torrent data
{ "resource": "" }
c22047
train
// Creates natives files for any zero-length file entries in the info. This is // a helper for file-based storages, which don't address or write to zero- // length files because they have no corresponding pieces.
{ "resource": "" }
c22048
train
// Returns EOF on short or missing file.
{ "resource": "" }
c22049
train
// Only returns EOF at the end of the torrent. Premature EOF is ErrUnexpectedEOF.
{ "resource": "" }
c22050
train
// Returns the metainfo info dictionary, or nil if it's not yet available.
{ "resource": "" }
c22051
train
// Returns a Reader bound to the torrent's data. All read calls block until // the data requested is actually available.
{ "resource": "" }
c22052
train
// Returns the state of pieces of the torrent. They are grouped into runs of // same state. The sum of the state run lengths is the number of pieces // in the torrent.
{ "resource": "" }
c22053
train
// Get missing bytes count for specific piece.
{ "resource": "" }
c22054
train
// Drop the torrent from the client, and close it. It's always safe to do // this. No data corruption can, or should occur to either the torrent's data, // or connected peers.
{ "resource": "" }
c22055
train
// Number of bytes of the entire torrent we have completed. This is the sum of // completed pieces, and dirtied chunks of incomplete pieces. Do not use this // for download rate, as it can go down when pieces are lost or fail checks. // Sample Torrent.Stats.DataBytesRead for actual file data download rate.
{ "resource": "" }
c22056
train
// Returns true if the torrent is currently being seeded. This occurs when the // client is willing to upload without wanting anything in return.
{ "resource": "" }
c22057
train
// Clobbers the torrent display name. The display name is used as the torrent // name if the metainfo is not available.
{ "resource": "" }
c22058
train
// Returns a run-time generated metainfo for the torrent that includes the // info bytes and announce-list as currently known to the client.
{ "resource": "" }
c22059
train
// Raise the priorities of pieces in the range [begin, end) to at least Normal // priority. Piece indexes are not the same as bytes. Requires that the info // has been obtained, see Torrent.Info and Torrent.GotInfo.
{ "resource": "" }
c22060
train
// KnownSwarm returns the known subset of the peers in the Torrent's swarm, including active, // pending, and half-open peers.
{ "resource": "" }
c22061
train
// There's a connection to that address already.
{ "resource": "" }
c22062
train
// Returns the index of the first file containing the piece. files must be // ordered by offset.
{ "resource": "" }
c22063
train
// Returns the index after the last file containing the piece. files must be // ordered by offset.
{ "resource": "" }
c22064
train
// Called when metadata for a torrent becomes available.
{ "resource": "" }
c22065
train
// The current working name for the torrent. Either the name in the info dict, // or a display name given such as by the dn value in a magnet link, or "".
{ "resource": "" }
c22066
train
// Produces a small string representing a PieceStateRun.
{ "resource": "" }
c22067
train
// Returns a run-time generated MetaInfo that includes the info bytes and // announce-list as currently known to the client.
{ "resource": "" }
c22068
train
// Bytes left to give in tracker announces.
{ "resource": "" }
c22069
train
// Return the request that would include the given offset into the torrent // data. Returns !ok if there is no such request.
{ "resource": "" }
c22070
train
// The worst connection is one that hasn't been sent, or sent anything useful // for the longest. A bad connection is one that usually sends us unwanted // pieces, or has been in worser half of the established connections for more // than a minute.
{ "resource": "" }
c22071
train
// Update all piece priorities in one hit. This function should have the same // output as updatePiecePriority, but across all pieces.
{ "resource": "" }
c22072
train
// Returns the range of pieces [begin, end) that contains the extent of bytes.
{ "resource": "" }
c22073
train
// Returns true if all iterations complete without breaking. Returns the read // regions for all readers. The reader regions should not be merged as some // callers depend on this method to enumerate readers.
{ "resource": "" }
c22074
train
// Non-blocking read. Client lock is not required.
{ "resource": "" }
c22075
train
// Returns an error if the metadata was completed, but couldn't be set for // some reason. Blame it on the last peer to contribute.
{ "resource": "" }
c22076
train
// Don't call this before the info is available.
{ "resource": "" }
c22077
train
// Returns true if connection is removed from torrent.Conns.
{ "resource": "" }
c22078
train
// Returns whether the client should make effort to seed the torrent.
{ "resource": "" }
c22079
train
// Adds and starts tracker scrapers for tracker URLs that aren't already // running.
{ "resource": "" }
c22080
train
// Returns an AnnounceRequest with fields filled out to defaults and current // values.
{ "resource": "" }
c22081
train
// Adds peers revealed in an announce until the announce ends, or we have // enough peers.
{ "resource": "" }
c22082
train
// The total number of peers in the torrent.
{ "resource": "" }
c22083
train
// Reconcile bytes transferred before connection was associated with a // torrent.
{ "resource": "" }
c22084
train
// Returns true if the connection is added.
{ "resource": "" }
c22085
train
// Called when a piece is found to be not complete.
{ "resource": "" }
c22086
train
// Return the connections that touched a piece, and clear the entries while // doing it.
{ "resource": "" }
c22087
train
// Currently doesn't really queue, but should in the future.
{ "resource": "" }
c22088
train
// Start the process of connecting to the given peer for the given torrent if // appropriate.
{ "resource": "" }
c22089
train
// All stats that include this Torrent. Useful when we want to increment // ConnStats but not for every connection.
{ "resource": "" }
c22090
train
// This is a helper that sets Files and Pieces from a root path and its // children.
{ "resource": "" }
c22091
train
// Concatenates all the files in the torrent into w. open is a function that // gets at the contents of the given file.
{ "resource": "" }
c22092
train
// The files field, converted up from the old single-file in the parent info // dict if necessary. This is a helper to avoid having to conditionally handle // single and multi-file torrent infos.
{ "resource": "" }
c22093
train
// makeStoredLabels converts labels into a map for quicker retrieval. // Incoming labels, if desired, may contain mappings in format "newName=oldName"
{ "resource": "" }
c22094
train
// makeIgnoredLabels converts label slice into a map for later use.
{ "resource": "" }
c22095
train
// NewLabelCopier creates a new instance of LabelCopier type
{ "resource": "" }
c22096
train
// Generate point value for event
{ "resource": "" }
c22097
train
// Returns a thread-safe implementation of core.EventSink for InfluxDB.
{ "resource": "" }
c22098
train
// timeSeriesToPoint transfers the contents holding in the given pointer of sink_api.Timeseries // into the instance of opentsdbclient.DataPoint
{ "resource": "" }
c22099
train
// putDefaultTags just fills in the default key-value pair for the tags. // OpenTSDB requires at least one non-empty tag otherwise the OpenTSDB will return error and the operation of putting // datapoint will be failed.
{ "resource": "" }