.. include:: header.rst

`home`__

__ reference.html

.. contents:: Table of contents
  :depth: 2
  :backlinks: none

.. raw:: html

	<a name="peer_request"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:class+peer_request&labels=documentation&body=Documentation+under+heading+%22class+peer_request%22+could+be+improved">report issue</a>]</span>



peer_request
------------

Declared in "`libtorrent/peer_request.hpp`__"


__ include/libtorrent/peer_request.hpp

represents a byte range within a piece. Internally this is is used for
incoming piece requests.




.. parsed-literal::
	

	struct peer_request
	{
	   bool **operator==** (peer\_request const& r) const;
	
	   piece_index_t piece;
	   int start;
	   int length;
	};

.. raw:: html

	<a name="operator==()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_request%3A%3A%5Boperator%3D%3D%28%29%5D&labels=documentation&body=Documentation+under+heading+%22peer_request%3A%3A%5Boperator%3D%3D%28%29%5D%22+could+be+improved">report issue</a>]</span>



operator==()
............

.. parsed-literal::
	
	bool **operator==** (peer\_request const& r) const;
	

returns true if the right hand side `peer_request`__ refers to the same
range as this does.


__ reference-Core.html#peer_request

.. raw:: html

	<a name="piece"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_request%3A%3A%5Bpiece%5D&labels=documentation&body=Documentation+under+heading+%22peer_request%3A%3A%5Bpiece%5D%22+could+be+improved">report issue</a>]</span>


piece
	The index of the piece in which the range starts.
	


.. raw:: html

	<a name="start"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_request%3A%3A%5Bstart%5D&labels=documentation&body=Documentation+under+heading+%22peer_request%3A%3A%5Bstart%5D%22+could+be+improved">report issue</a>]</span>


start
	The byte offset within that piece where the range starts.
	


.. raw:: html

	<a name="length"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_request%3A%3A%5Blength%5D&labels=documentation&body=Documentation+under+heading+%22peer_request%3A%3A%5Blength%5D%22+could+be+improved">report issue</a>]</span>


length
	The size of the range, in bytes.
	


.. raw:: html

	<a name="piece_block"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:class+piece_block&labels=documentation&body=Documentation+under+heading+%22class+piece_block%22+could+be+improved">report issue</a>]</span>



piece_block
-----------

Declared in "`libtorrent/piece_block.hpp`__"


__ include/libtorrent/piece_block.hpp





.. parsed-literal::
	

	struct piece_block
	{
	   **piece_block** (piece\_index\_t p\_index, int b\_index);
	   **piece_block** () = default;
	   bool **operator<** (piece\_block const& b) const;
	   bool **operator==** (piece\_block const& b) const;
	   bool **operator!=** (piece\_block const& b) const;
	
	   static const piece_block invalid;
	   piece_index_t piece_index {0};
	   int **block_index**  = 0;
	};

.. raw:: html

	<a name="info_hash_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:class+info_hash_t&labels=documentation&body=Documentation+under+heading+%22class+info_hash_t%22+could+be+improved">report issue</a>]</span>



info_hash_t
-----------

Declared in "`libtorrent/info_hash.hpp`__"


__ include/libtorrent/info_hash.hpp

class holding the info-hash of a torrent. It can hold a v1 info-hash
(SHA-1) or a v2 info-hash (SHA-256) or both.

.. note::

	If ``has_v2()`` is false then the v1 hash might actually be a truncated
	v2 hash




.. parsed-literal::
	

	struct info_hash_t
	{
	   **info_hash_t** () noexcept = default;
	   explicit **info_hash_t** (sha256\_hash h2) noexcept;
	   **info_hash_t** (sha1\_hash h1, sha256\_hash h2) noexcept;
	   explicit **info_hash_t** (sha1\_hash h1) noexcept;
	   bool **has_v1** () const;
	   bool **has_v2** () const;
	   bool **has** (protocol\_version v) const;
	   sha1_hash **get** (protocol\_version v) const;
	   sha1_hash **get_best** () const;
	   friend bool **operator!=** (info\_hash\_t const& lhs, info\_hash\_t const& rhs);
	   friend bool **operator==** (info\_hash\_t const& lhs, info\_hash\_t const& rhs) noexcept;
	   template <typename F> void **for_each** (F f) const;
	   bool **operator<** (info\_hash\_t const& o) const;
	   friend std::ostream& **operator<<** (std\:\:ostream& os, info\_hash\_t const& ih);
	
	   sha1_hash v1;
	   sha256_hash v2;
	};

.. raw:: html

	<a name="info_hash_t()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:info_hash_t%3A%3A%5Binfo_hash_t%28%29%5D&labels=documentation&body=Documentation+under+heading+%22info_hash_t%3A%3A%5Binfo_hash_t%28%29%5D%22+could+be+improved">report issue</a>]</span>



info_hash_t()
.............

.. parsed-literal::
	
	**info_hash_t** () noexcept = default;
	explicit **info_hash_t** (sha256\_hash h2) noexcept;
	**info_hash_t** (sha1\_hash h1, sha256\_hash h2) noexcept;
	explicit **info_hash_t** (sha1\_hash h1) noexcept;
	

The default constructor creates an object that has neither a v1 or v2
hash.

For backwards compatibility, make it possible to construct directly
from a v1 hash. This constructor allows *implicit* conversion from a
v1 hash, but the implicitness is deprecated.



.. raw:: html

	<a name="has_v2()"></a>
	<a name="has_v1()"></a>
	<a name="has()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:info_hash_t%3A%3A%5Bhas_v2%28%29+has_v1%28%29+has%28%29%5D&labels=documentation&body=Documentation+under+heading+%22info_hash_t%3A%3A%5Bhas_v2%28%29+has_v1%28%29+has%28%29%5D%22+could+be+improved">report issue</a>]</span>



has_v2() has_v1() has()
.......................

.. parsed-literal::
	
	bool **has_v1** () const;
	bool **has_v2** () const;
	bool **has** (protocol\_version v) const;
	

returns true if the corresponding info hash is present in this
object.



.. raw:: html

	<a name="get()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:info_hash_t%3A%3A%5Bget%28%29%5D&labels=documentation&body=Documentation+under+heading+%22info_hash_t%3A%3A%5Bget%28%29%5D%22+could+be+improved">report issue</a>]</span>



get()
.....

.. parsed-literal::
	
	sha1_hash **get** (protocol\_version v) const;
	

returns the has for the specified protocol version



.. raw:: html

	<a name="get_best()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:info_hash_t%3A%3A%5Bget_best%28%29%5D&labels=documentation&body=Documentation+under+heading+%22info_hash_t%3A%3A%5Bget_best%28%29%5D%22+could+be+improved">report issue</a>]</span>



get_best()
..........

.. parsed-literal::
	
	sha1_hash **get_best** () const;
	

returns the v2 (truncated) info-hash, if there is one, otherwise
returns the v1 info-hash



.. raw:: html

	<a name="for_each()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:info_hash_t%3A%3A%5Bfor_each%28%29%5D&labels=documentation&body=Documentation+under+heading+%22info_hash_t%3A%3A%5Bfor_each%28%29%5D%22+could+be+improved">report issue</a>]</span>



for_each()
..........

.. parsed-literal::
	
	template <typename F> void **for_each** (F f) const;
	

calls the function object ``f`` for each hash that is available.
starting with v1. The signature of ``F`` is::

	void(sha1_hash const&, protocol_version);



.. raw:: html

	<a name="peer_info"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:class+peer_info&labels=documentation&body=Documentation+under+heading+%22class+peer_info%22+could+be+improved">report issue</a>]</span>



peer_info
---------

Declared in "`libtorrent/peer_info.hpp`__"


__ include/libtorrent/peer_info.hpp

holds information and statistics about one peer
that libtorrent is connected to




.. parsed-literal::
	

	struct peer_info
	{
	   std::string client;
	   typed_bitfield<piece_index_t> pieces;
	   std::int64_t total_download;
	   std::int64_t total_upload;
	   time_duration last_request;
	   time_duration last_active;
	   time_duration download_queue_time;
	   static constexpr peer_flags_t **interesting**  = 0_bit;
	   static constexpr peer_flags_t **choked**  = 1_bit;
	   static constexpr peer_flags_t **remote_interested**  = 2_bit;
	   static constexpr peer_flags_t **remote_choked**  = 3_bit;
	   static constexpr peer_flags_t **supports_extensions**  = 4_bit;
	   static constexpr peer_flags_t **outgoing_connection**  = 5_bit;
	   static constexpr peer_flags_t **local_connection**  = 5_bit;
	   static constexpr peer_flags_t **handshake**  = 6_bit;
	   static constexpr peer_flags_t **connecting**  = 7_bit;
	   static constexpr peer_flags_t **on_parole**  = 9_bit;
	   static constexpr peer_flags_t **seed**  = 10_bit;
	   static constexpr peer_flags_t **optimistic_unchoke**  = 11_bit;
	   static constexpr peer_flags_t **snubbed**  = 12_bit;
	   static constexpr peer_flags_t **upload_only**  = 13_bit;
	   static constexpr peer_flags_t **endgame_mode**  = 14_bit;
	   static constexpr peer_flags_t **holepunched**  = 15_bit;
	   static constexpr peer_flags_t **i2p_socket**  = 16_bit;
	   static constexpr peer_flags_t **utp_socket**  = 17_bit;
	   static constexpr peer_flags_t **ssl_socket**  = 18_bit;
	   static constexpr peer_flags_t **rc4_encrypted**  = 19_bit;
	   static constexpr peer_flags_t **plaintext_encrypted**  = 20_bit;
	   peer_flags_t flags;
	   static constexpr peer_source_flags_t **tracker**  = 0_bit;
	   static constexpr peer_source_flags_t **dht**  = 1_bit;
	   static constexpr peer_source_flags_t **pex**  = 2_bit;
	   static constexpr peer_source_flags_t **lsd**  = 3_bit;
	   static constexpr peer_source_flags_t **resume_data**  = 4_bit;
	   static constexpr peer_source_flags_t **incoming**  = 5_bit;
	   peer_source_flags_t source;
	   int up_speed;
	   int down_speed;
	   int payload_up_speed;
	   int payload_down_speed;
	   peer_id pid;
	   int queue_bytes;
	   int request_timeout;
	   int send_buffer_size;
	   int used_send_buffer;
	   int receive_buffer_size;
	   int used_receive_buffer;
	   int receive_buffer_watermark;
	   int num_hashfails;
	   int download_queue_length;
	   int timed_out_requests;
	   int busy_requests;
	   int requests_in_buffer;
	   int target_dl_queue_length;
	   int upload_queue_length;
	   int failcount;
	   piece_index_t downloading_piece_index;
	   int downloading_block_index;
	   int downloading_progress;
	   int downloading_total;
	   static constexpr connection_type_t **standard_bittorrent**  = 0_bit;
	   static constexpr connection_type_t **web_seed**  = 1_bit;
	   static constexpr connection_type_t **http_seed**  = 2_bit;
	   connection_type_t connection_type;
	   int pending_disk_bytes;
	   int pending_disk_read_bytes;
	   int send_quota;
	   int receive_quota;
	   int rtt;
	   int num_pieces;
	   int download_rate_peak;
	   int upload_rate_peak;
	   float progress;
	   int progress_ppm;
	   tcp::endpoint ip;
	   tcp::endpoint local_endpoint;
	   static constexpr bandwidth_state_flags_t **bw_idle**  = 0_bit;
	   static constexpr bandwidth_state_flags_t **bw_limit**  = 1_bit;
	   static constexpr bandwidth_state_flags_t **bw_network**  = 2_bit;
	   static constexpr bandwidth_state_flags_t **bw_disk**  = 4_bit;
	   bandwidth_state_flags_t read_state;
	   bandwidth_state_flags_t write_state;
	};

.. raw:: html

	<a name="client"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bclient%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bclient%5D%22+could+be+improved">report issue</a>]</span>


client
	A human readable string describing the software at the other end of
	the connection. In some cases this information is not available, then
	it will contain a string that may give away something about which
	software is running in the other end. In the case of a web seed, the
	server type and version will be a part of this string. This is UTF-8
	encoded.
	


.. raw:: html

	<a name="pieces"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpieces%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpieces%5D%22+could+be+improved">report issue</a>]</span>


pieces
	a `bitfield`__, with one bit per piece in the torrent. Each bit tells you
	if the peer has that piece (if it's set to 1) or if the peer miss that
	piece (set to 0).
	

__ reference-Utility.html#bitfield

.. raw:: html

	<a name="total_download"></a>
	<a name="total_upload"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Btotal_download+total_upload%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Btotal_download+total_upload%5D%22+could+be+improved">report issue</a>]</span>


total_download total_upload
	the total number of bytes downloaded from and uploaded to this peer.
	These numbers do not include the protocol chatter, but only the
	payload data.
	


.. raw:: html

	<a name="last_request"></a>
	<a name="last_active"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Blast_request+last_active%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Blast_request+last_active%5D%22+could+be+improved">report issue</a>]</span>


last_request last_active
	the time since we last sent a request to this peer and since any
	transfer occurred with this peer
	


.. raw:: html

	<a name="download_queue_time"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bdownload_queue_time%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bdownload_queue_time%5D%22+could+be+improved">report issue</a>]</span>


download_queue_time
	the time until all blocks in the request queue will be downloaded
	


.. raw:: html

	<a name="interesting"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Binteresting%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Binteresting%5D%22+could+be+improved">report issue</a>]</span>


interesting
	**we** are interested in pieces from this peer.
	


.. raw:: html

	<a name="choked"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bchoked%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bchoked%5D%22+could+be+improved">report issue</a>]</span>


choked
	**we** have choked this peer.
	


.. raw:: html

	<a name="remote_interested"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bremote_interested%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bremote_interested%5D%22+could+be+improved">report issue</a>]</span>


remote_interested
	the peer is interested in **us**
	


.. raw:: html

	<a name="remote_choked"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bremote_choked%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bremote_choked%5D%22+could+be+improved">report issue</a>]</span>


remote_choked
	the peer has choked **us**.
	


.. raw:: html

	<a name="supports_extensions"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bsupports_extensions%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bsupports_extensions%5D%22+could+be+improved">report issue</a>]</span>


supports_extensions
	means that this peer supports the
	`extension protocol`__.
	
	__ extension_protocol.html
	


.. raw:: html

	<a name="outgoing_connection"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Boutgoing_connection%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Boutgoing_connection%5D%22+could+be+improved">report issue</a>]</span>


outgoing_connection
	The connection was initiated by us, the peer has a
	listen port open, and that port is the same as in the
	address of this peer. If this flag is not set, this
	peer connection was opened by this peer connecting to
	us.
	


.. raw:: html

	<a name="local_connection"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Blocal_connection%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Blocal_connection%5D%22+could+be+improved">report issue</a>]</span>


local_connection
	deprecated synonym for outgoing_connection
	


.. raw:: html

	<a name="handshake"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bhandshake%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bhandshake%5D%22+could+be+improved">report issue</a>]</span>


handshake
	The connection is opened, and waiting for the
	handshake. Until the handshake is done, the peer
	cannot be identified.
	


.. raw:: html

	<a name="connecting"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bconnecting%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bconnecting%5D%22+could+be+improved">report issue</a>]</span>


connecting
	The connection is in a half-open state (i.e. it is
	being connected).
	


.. raw:: html

	<a name="on_parole"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bon_parole%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bon_parole%5D%22+could+be+improved">report issue</a>]</span>


on_parole
	The peer has participated in a piece that failed the
	hash check, and is now "on parole", which means we're
	only requesting whole pieces from this peer until
	it either fails that piece or proves that it doesn't
	send bad data.
	


.. raw:: html

	<a name="seed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bseed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bseed%5D%22+could+be+improved">report issue</a>]</span>


seed
	This peer is a seed (it has all the pieces).
	


.. raw:: html

	<a name="optimistic_unchoke"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Boptimistic_unchoke%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Boptimistic_unchoke%5D%22+could+be+improved">report issue</a>]</span>


optimistic_unchoke
	This peer is subject to an optimistic unchoke. It has
	been unchoked for a while to see if it might unchoke
	us in return an earn an upload/unchoke slot. If it
	doesn't within some period of time, it will be choked
	and another peer will be optimistically unchoked.
	


.. raw:: html

	<a name="snubbed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bsnubbed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bsnubbed%5D%22+could+be+improved">report issue</a>]</span>


snubbed
	This peer has recently failed to send a block within
	the request timeout from when the request was sent.
	We're currently picking one block at a time from this
	peer.
	


.. raw:: html

	<a name="upload_only"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bupload_only%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bupload_only%5D%22+could+be+improved">report issue</a>]</span>


upload_only
	This peer has either explicitly (with an extension)
	or implicitly (by becoming a seed) told us that it
	will not downloading anything more, regardless of
	which pieces we have.
	


.. raw:: html

	<a name="endgame_mode"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bendgame_mode%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bendgame_mode%5D%22+could+be+improved">report issue</a>]</span>


endgame_mode
	This means the last time this peer picket a piece,
	it could not pick as many as it wanted because there
	were not enough free ones. i.e. all pieces this peer
	has were already requested from other peers.
	


.. raw:: html

	<a name="holepunched"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bholepunched%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bholepunched%5D%22+could+be+improved">report issue</a>]</span>


holepunched
	This flag is set if the peer was in holepunch mode
	when the connection succeeded. This typically only
	happens if both peers are behind a NAT and the peers
	connect via the NAT holepunch mechanism.
	


.. raw:: html

	<a name="i2p_socket"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bi2p_socket%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bi2p_socket%5D%22+could+be+improved">report issue</a>]</span>


i2p_socket
	indicates that this socket is running on top of the
	I2P transport.
	


.. raw:: html

	<a name="utp_socket"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Butp_socket%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Butp_socket%5D%22+could+be+improved">report issue</a>]</span>


utp_socket
	indicates that this socket is a uTP socket
	


.. raw:: html

	<a name="ssl_socket"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bssl_socket%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bssl_socket%5D%22+could+be+improved">report issue</a>]</span>


ssl_socket
	indicates that this socket is running on top of an SSL
	(TLS) channel
	


.. raw:: html

	<a name="rc4_encrypted"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Brc4_encrypted%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Brc4_encrypted%5D%22+could+be+improved">report issue</a>]</span>


rc4_encrypted
	this connection is obfuscated with RC4
	


.. raw:: html

	<a name="plaintext_encrypted"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bplaintext_encrypted%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bplaintext_encrypted%5D%22+could+be+improved">report issue</a>]</span>


plaintext_encrypted
	the handshake of this connection was obfuscated
	with a Diffie-Hellman exchange
	


.. raw:: html

	<a name="flags"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bflags%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bflags%5D%22+could+be+improved">report issue</a>]</span>


flags
	tells you in which state the peer is in. It is set to
	any combination of the peer_flags_t flags above.
	


.. raw:: html

	<a name="tracker"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Btracker%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Btracker%5D%22+could+be+improved">report issue</a>]</span>


tracker
	The peer was received from the tracker.
	


.. raw:: html

	<a name="dht"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bdht%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bdht%5D%22+could+be+improved">report issue</a>]</span>


dht
	The peer was received from the kademlia DHT.
	


.. raw:: html

	<a name="pex"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpex%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpex%5D%22+could+be+improved">report issue</a>]</span>


pex
	The peer was received from the peer exchange
	extension.
	


.. raw:: html

	<a name="lsd"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Blsd%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Blsd%5D%22+could+be+improved">report issue</a>]</span>


lsd
	The peer was received from the local service
	discovery (The peer is on the local network).
	


.. raw:: html

	<a name="resume_data"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bresume_data%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bresume_data%5D%22+could+be+improved">report issue</a>]</span>


resume_data
	The peer was added from the fast resume data.
	


.. raw:: html

	<a name="incoming"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bincoming%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bincoming%5D%22+could+be+improved">report issue</a>]</span>


incoming
	we received an incoming connection from this peer
	


.. raw:: html

	<a name="source"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bsource%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bsource%5D%22+could+be+improved">report issue</a>]</span>


source
	a combination of flags describing from which sources this peer
	was received. A combination of the peer_source_flags_t above.
	


.. raw:: html

	<a name="up_speed"></a>
	<a name="down_speed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bup_speed+down_speed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bup_speed+down_speed%5D%22+could+be+improved">report issue</a>]</span>


up_speed down_speed
	the current upload and download speed we have to and from this peer
	(including any protocol messages). updated about once per second
	


.. raw:: html

	<a name="payload_up_speed"></a>
	<a name="payload_down_speed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpayload_up_speed+payload_down_speed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpayload_up_speed+payload_down_speed%5D%22+could+be+improved">report issue</a>]</span>


payload_up_speed payload_down_speed
	The transfer rates of payload data only updated about once per second
	


.. raw:: html

	<a name="pid"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpid%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpid%5D%22+could+be+improved">report issue</a>]</span>


pid
	the peer's id as used in the bit torrent protocol. This id can be used
	to extract 'fingerprints' from the peer. Sometimes it can tell you
	which client the peer is using. See identify_client()_
	


.. raw:: html

	<a name="queue_bytes"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bqueue_bytes%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bqueue_bytes%5D%22+could+be+improved">report issue</a>]</span>


queue_bytes
	the number of bytes we have requested from this peer, but not yet
	received.
	


.. raw:: html

	<a name="request_timeout"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Brequest_timeout%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Brequest_timeout%5D%22+could+be+improved">report issue</a>]</span>


request_timeout
	the number of seconds until the current front piece request will time
	out. This timeout can be adjusted through
	``settings_pack::request_timeout``.
	-1 means that there is not outstanding request.
	


.. raw:: html

	<a name="send_buffer_size"></a>
	<a name="used_send_buffer"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bsend_buffer_size+used_send_buffer%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bsend_buffer_size+used_send_buffer%5D%22+could+be+improved">report issue</a>]</span>


send_buffer_size used_send_buffer
	the number of bytes allocated
	and used for the peer's send buffer, respectively.
	


.. raw:: html

	<a name="receive_buffer_size"></a>
	<a name="used_receive_buffer"></a>
	<a name="receive_buffer_watermark"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Breceive_buffer_size+used_receive_buffer+receive_buffer_watermark%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Breceive_buffer_size+used_receive_buffer+receive_buffer_watermark%5D%22+could+be+improved">report issue</a>]</span>


receive_buffer_size used_receive_buffer receive_buffer_watermark
	the number of bytes
	allocated and used as receive buffer, respectively.
	


.. raw:: html

	<a name="num_hashfails"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bnum_hashfails%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bnum_hashfails%5D%22+could+be+improved">report issue</a>]</span>


num_hashfails
	the number of pieces this peer has participated in sending us that
	turned out to fail the hash check.
	


.. raw:: html

	<a name="download_queue_length"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bdownload_queue_length%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bdownload_queue_length%5D%22+could+be+improved">report issue</a>]</span>


download_queue_length
	this is the number of requests we have sent to this peer that we
	haven't got a response for yet
	


.. raw:: html

	<a name="timed_out_requests"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Btimed_out_requests%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Btimed_out_requests%5D%22+could+be+improved">report issue</a>]</span>


timed_out_requests
	the number of block requests that have timed out, and are still in the
	download queue
	


.. raw:: html

	<a name="busy_requests"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bbusy_requests%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bbusy_requests%5D%22+could+be+improved">report issue</a>]</span>


busy_requests
	the number of busy requests in the download queue. A busy request is a
	request for a block we've also requested from a different peer
	


.. raw:: html

	<a name="requests_in_buffer"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Brequests_in_buffer%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Brequests_in_buffer%5D%22+could+be+improved">report issue</a>]</span>


requests_in_buffer
	the number of requests messages that are currently in the send buffer
	waiting to be sent.
	


.. raw:: html

	<a name="target_dl_queue_length"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Btarget_dl_queue_length%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Btarget_dl_queue_length%5D%22+could+be+improved">report issue</a>]</span>


target_dl_queue_length
	the number of requests that is tried to be maintained (this is
	typically a function of download speed)
	


.. raw:: html

	<a name="upload_queue_length"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bupload_queue_length%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bupload_queue_length%5D%22+could+be+improved">report issue</a>]</span>


upload_queue_length
	the number of piece-requests we have received from this peer
	that we haven't answered with a piece yet.
	


.. raw:: html

	<a name="failcount"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bfailcount%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bfailcount%5D%22+could+be+improved">report issue</a>]</span>


failcount
	the number of times this peer has "failed". i.e. failed to connect or
	disconnected us. The failcount is decremented when we see this peer in
	a tracker response or peer exchange message.
	


.. raw:: html

	<a name="downloading_piece_index"></a>
	<a name="downloading_block_index"></a>
	<a name="downloading_progress"></a>
	<a name="downloading_total"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bdownloading_piece_index+downloading_block_index+downloading_progress+downloading_total%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bdownloading_piece_index+downloading_block_index+downloading_progress+downloading_total%5D%22+could+be+improved">report issue</a>]</span>


downloading_piece_index downloading_block_index downloading_progress downloading_total
	You can know which piece, and which part of that piece, that is
	currently being downloaded from a specific peer by looking at these
	four members. ``downloading_piece_index`` is the index of the piece
	that is currently being downloaded. This may be set to -1 if there's
	currently no piece downloading from this peer. If it is >= 0, the
	other three members are valid. ``downloading_block_index`` is the
	index of the block (or sub-piece) that is being downloaded.
	``downloading_progress`` is the number of bytes of this block we have
	received from the peer, and ``downloading_total`` is the total number
	of bytes in this block.
	


.. raw:: html

	<a name="standard_bittorrent"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bstandard_bittorrent%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bstandard_bittorrent%5D%22+could+be+improved">report issue</a>]</span>


standard_bittorrent
	Regular bittorrent connection
	


.. raw:: html

	<a name="web_seed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bweb_seed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bweb_seed%5D%22+could+be+improved">report issue</a>]</span>


web_seed
	HTTP connection using the `BEP 19`_ protocol
	


.. raw:: html

	<a name="http_seed"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bhttp_seed%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bhttp_seed%5D%22+could+be+improved">report issue</a>]</span>


http_seed
	HTTP connection using the `BEP 17`_ protocol
	


.. raw:: html

	<a name="connection_type"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bconnection_type%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bconnection_type%5D%22+could+be+improved">report issue</a>]</span>


connection_type
	the kind of connection this peer uses. See connection_type_t.
	


.. raw:: html

	<a name="pending_disk_bytes"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpending_disk_bytes%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpending_disk_bytes%5D%22+could+be+improved">report issue</a>]</span>


pending_disk_bytes
	the number of bytes this peer has pending in the disk-io thread.
	Downloaded and waiting to be written to disk. This is what is capped
	by ``settings_pack::max_queued_disk_bytes``.
	


.. raw:: html

	<a name="pending_disk_read_bytes"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bpending_disk_read_bytes%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bpending_disk_read_bytes%5D%22+could+be+improved">report issue</a>]</span>


pending_disk_read_bytes
	number of outstanding bytes to read
	from disk
	


.. raw:: html

	<a name="send_quota"></a>
	<a name="receive_quota"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bsend_quota+receive_quota%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bsend_quota+receive_quota%5D%22+could+be+improved">report issue</a>]</span>


send_quota receive_quota
	the number of bytes this peer has been assigned to be allowed to send
	and receive until it has to request more quota from the bandwidth
	manager.
	


.. raw:: html

	<a name="rtt"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Brtt%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Brtt%5D%22+could+be+improved">report issue</a>]</span>


rtt
	an estimated round trip time to this peer, in milliseconds. It is
	estimated by timing the TCP ``connect()``. It may be 0 for
	incoming connections.
	


.. raw:: html

	<a name="num_pieces"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bnum_pieces%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bnum_pieces%5D%22+could+be+improved">report issue</a>]</span>


num_pieces
	the number of pieces this peer has.
	


.. raw:: html

	<a name="download_rate_peak"></a>
	<a name="upload_rate_peak"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bdownload_rate_peak+upload_rate_peak%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bdownload_rate_peak+upload_rate_peak%5D%22+could+be+improved">report issue</a>]</span>


download_rate_peak upload_rate_peak
	the highest download and upload rates seen on this connection. They
	are given in bytes per second. This number is reset to 0 on reconnect.
	


.. raw:: html

	<a name="progress"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bprogress%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bprogress%5D%22+could+be+improved">report issue</a>]</span>


progress
	the progress of the peer in the range [0, 1]. This is always 0 when
	floating point operations are disabled, instead use ``progress_ppm``.
	


.. raw:: html

	<a name="progress_ppm"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bprogress_ppm%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bprogress_ppm%5D%22+could+be+improved">report issue</a>]</span>


progress_ppm
	indicates the download progress of the peer in the range [0, 1000000]
	(parts per million).
	


.. raw:: html

	<a name="ip"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bip%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bip%5D%22+could+be+improved">report issue</a>]</span>


ip
	the IP-address to this peer. The type is an asio endpoint. For
	more info, see the asio_ documentation.
	
	.. _asio: http://asio.sourceforge.net/asio-0.3.8/doc/asio/reference.html
	


.. raw:: html

	<a name="local_endpoint"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Blocal_endpoint%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Blocal_endpoint%5D%22+could+be+improved">report issue</a>]</span>


local_endpoint
	the IP and port pair the socket is bound to locally. i.e. the IP
	address of the interface it's going out over. This may be useful for
	multi-homed clients with multiple interfaces to the internet.
	


.. raw:: html

	<a name="bw_idle"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bbw_idle%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bbw_idle%5D%22+could+be+improved">report issue</a>]</span>


bw_idle
	The peer is not waiting for any external events to
	send or receive data.
	


.. raw:: html

	<a name="bw_limit"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bbw_limit%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bbw_limit%5D%22+could+be+improved">report issue</a>]</span>


bw_limit
	The peer is waiting for the rate limiter.
	


.. raw:: html

	<a name="bw_network"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bbw_network%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bbw_network%5D%22+could+be+improved">report issue</a>]</span>


bw_network
	The peer has quota and is currently waiting for a
	network read or write operation to complete. This is
	the state all peers are in if there are no bandwidth
	limits.
	


.. raw:: html

	<a name="bw_disk"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bbw_disk%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bbw_disk%5D%22+could+be+improved">report issue</a>]</span>


bw_disk
	The peer is waiting for the disk I/O thread to catch
	up writing buffers to disk before downloading more.
	


.. raw:: html

	<a name="read_state"></a>
	<a name="write_state"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:peer_info%3A%3A%5Bread_state+write_state%5D&labels=documentation&body=Documentation+under+heading+%22peer_info%3A%3A%5Bread_state+write_state%5D%22+could+be+improved">report issue</a>]</span>


read_state write_state
	bitmasks indicating what state this peer
	is in with regards to sending and receiving data. The states are
	defined as independent flags of type bandwidth_state_flags_t, in this
	class.
	


.. raw:: html

	<a name="version()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:version%28%29&labels=documentation&body=Documentation+under+heading+%22version%28%29%22+could+be+improved">report issue</a>]</span>



version()
---------

Declared in "`libtorrent/version.hpp`__"


__ include/libtorrent/version.hpp

.. parsed-literal::
	
	char const* **version** ();
	

returns the libtorrent version as string form in this format:
"<major>.<minor>.<tiny>.<tag>"



.. raw:: html

	<a name="truncate_files()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:truncate_files%28%29&labels=documentation&body=Documentation+under+heading+%22truncate_files%28%29%22+could+be+improved">report issue</a>]</span>



truncate_files()
----------------

Declared in "`libtorrent/truncate.hpp`__"


__ include/libtorrent/truncate.hpp

.. parsed-literal::
	
	void **truncate_files** (file\_storage const& fs, std\:\:string const& save\_path, storage\_error& ec);
	

Truncates files larger than specified in the `file_storage`__, saved under
the specified save_path.


__ reference-Storage.html#file_storage

.. raw:: html

	<a name="make_magnet_uri()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:make_magnet_uri%28%29&labels=documentation&body=Documentation+under+heading+%22make_magnet_uri%28%29%22+could+be+improved">report issue</a>]</span>



make_magnet_uri()
-----------------

Declared in "`libtorrent/magnet_uri.hpp`__"


__ include/libtorrent/magnet_uri.hpp

.. parsed-literal::
	
	std::string **make_magnet_uri** (torrent\_info const& info);
	std::string **make_magnet_uri** (torrent\_handle const& handle);
	std::string **make_magnet_uri** (add\_torrent\_params const& atp);
	

Generates a magnet URI from the specified torrent.

Several fields from the `add_torrent_params`__ objects are recorded in the
magnet link. In order to not include them, they have to be cleared before
calling `make_magnet_uri()`__. These fields are used:

 ``ti``, ``info_hashes``, ``url_seeds``, ``dht_nodes``,
 ``file_priorities``, ``trackers``, ``name``, ``peers``.

Depending on what the use case for the resulting magnet link is, clearing
``peers`` and ``dht_nodes`` is probably a good idea if the `add_torrent_params`__
came from a running torrent. Those lists may be long and be ephemeral.

If none of the ``info_hashes`` or ``ti`` fields are set, there is not
info-hash available, and a magnet link cannot be created. In this case
`make_magnet_uri()`__ returns an empty string.

The recommended way to generate a magnet link from a `torrent_handle`__ is to
call `save_resume_data()`__, which will post a `save_resume_data_alert`__
containing an `add_torrent_params`__ object. This can then be passed to
`make_magnet_uri()`__.

The overload that takes a `torrent_handle`__ will make blocking calls to
query information about the torrent. If the torrent handle is invalid,
an empty string is returned.

For more information about magnet links, see `magnet links`__.


__ reference-Add_Torrent.html#add_torrent_params
__ reference-Core.html#make_magnet_uri()
__ reference-Add_Torrent.html#add_torrent_params
__ reference-Core.html#make_magnet_uri()
__ reference-Torrent_Handle.html#torrent_handle
__ reference-Torrent_Handle.html#save_resume_data()
__ reference-Alerts.html#save_resume_data_alert
__ reference-Add_Torrent.html#add_torrent_params
__ reference-Core.html#make_magnet_uri()
__ reference-Torrent_Handle.html#torrent_handle
__ manual-ref.html#magnet-links

.. raw:: html

	<a name="parse_magnet_uri()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:parse_magnet_uri%28%29&labels=documentation&body=Documentation+under+heading+%22parse_magnet_uri%28%29%22+could+be+improved">report issue</a>]</span>



parse_magnet_uri()
------------------

Declared in "`libtorrent/magnet_uri.hpp`__"


__ include/libtorrent/magnet_uri.hpp

.. parsed-literal::
	
	void **parse_magnet_uri** (string\_view uri, add\_torrent\_params& p, error\_code& ec);
	add_torrent_params **parse_magnet_uri** (string\_view uri);
	add_torrent_params **parse_magnet_uri** (string\_view uri, error\_code& ec);
	

This function parses out information from the magnet link and populates the
`add_torrent_params`__ object. The overload that does not take an
``error_code`` reference will throw a system_error on error
The overload taking an ``add_torrent_params`` reference will fill in the
fields specified in the magnet URI.


__ reference-Add_Torrent.html#add_torrent_params

.. raw:: html

	<a name="load_torrent_parsed()"></a>
	<a name="load_torrent_buffer()"></a>
	<a name="load_torrent_file()"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:load_torrent_parsed%28%29+load_torrent_buffer%28%29+load_torrent_file%28%29&labels=documentation&body=Documentation+under+heading+%22load_torrent_parsed%28%29+load_torrent_buffer%28%29+load_torrent_file%28%29%22+could+be+improved">report issue</a>]</span>



load_torrent_parsed() load_torrent_buffer() load_torrent_file()
---------------------------------------------------------------

Declared in "`libtorrent/load_torrent.hpp`__"


__ include/libtorrent/load_torrent.hpp

.. parsed-literal::
	
	add_torrent_params **load_torrent_buffer** (
	   span<char const> buffer);
	add_torrent_params **load_torrent_buffer** (
	   span<char const> buffer, load\_torrent\_limits const& cfg);
	add_torrent_params **load_torrent_parsed** (
	   bdecode\_node const& torrent\_file, load\_torrent\_limits const& cfg);
	add_torrent_params **load_torrent_file** (
	   std\:\:string const& filename, load\_torrent\_limits const& cfg);
	add_torrent_params **load_torrent_file** (
	   std\:\:string const& filename);
	add_torrent_params **load_torrent_parsed** (
	   bdecode\_node const& torrent\_file);
	

These functions load the content of a .torrent file into an
`add_torrent_params`__ object.
The immutable part of a torrent file (the info-dictionary) is stored in
the ``ti`` field in the `add_torrent_params`__ object (as a `torrent_info`__
object).
The returned object is suitable to be:

  * added to a `session`__ via `add_torrent()`__ or `async_add_torrent()`__
  * saved as a .torrent_file via `write_torrent_file()`__
  * turned into a magnet link via `make_magnet_uri()`__


__ reference-Add_Torrent.html#add_torrent_params
__ reference-Add_Torrent.html#add_torrent_params
__ reference-Torrent_Info.html#torrent_info
__ reference-Session.html#session
__ reference-Session.html#add_torrent()
__ reference-Session.html#async_add_torrent()
__ reference-Resume_Data.html#write_torrent_file()
__ reference-Core.html#make_magnet_uri()

.. raw:: html

	<a name="connection_type"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+connection_type&labels=documentation&body=Documentation+under+heading+%22enum+connection_type%22+could+be+improved">report issue</a>]</span>



enum connection_type
--------------------

Declared in "`libtorrent/peer_connection.hpp`__"


__ include/libtorrent/peer_connection.hpp

+------------+-------+-------------+
| name       | value | description |
+============+=======+=============+
| bittorrent | 0     |             |
+------------+-------+-------------+
| url_seed   | 1     |             |
+------------+-------+-------------+
| http_seed  | 2     |             |
+------------+-------+-------------+



.. raw:: html

	<a name="event_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+event_t&labels=documentation&body=Documentation+under+heading+%22enum+event_t%22+could+be+improved">report issue</a>]</span>



enum event_t
------------

Declared in "`libtorrent/tracker_manager.hpp`__"


__ include/libtorrent/tracker_manager.hpp

+-----------+-------+-------------+
| name      | value | description |
+===========+=======+=============+
| none      | 0     |             |
+-----------+-------+-------------+
| completed | 1     |             |
+-----------+-------+-------------+
| started   | 2     |             |
+-----------+-------+-------------+
| stopped   | 3     |             |
+-----------+-------+-------------+
| paused    | 4     |             |
+-----------+-------+-------------+



.. raw:: html

	<a name="portmap_transport"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+portmap_transport&labels=documentation&body=Documentation+under+heading+%22enum+portmap_transport%22+could+be+improved">report issue</a>]</span>



enum portmap_transport
----------------------

Declared in "`libtorrent/portmap.hpp`__"


__ include/libtorrent/portmap.hpp

+--------+-------+------------------------------+
| name   | value | description                  |
+========+=======+==============================+
| natpmp | 0     | natpmp can be NAT-PMP or PCP |
|        |       |                              |
+--------+-------+------------------------------+
| upnp   | 1     |                              |
+--------+-------+------------------------------+



.. raw:: html

	<a name="portmap_protocol"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+portmap_protocol&labels=documentation&body=Documentation+under+heading+%22enum+portmap_protocol%22+could+be+improved">report issue</a>]</span>



enum portmap_protocol
---------------------

Declared in "`libtorrent/portmap.hpp`__"


__ include/libtorrent/portmap.hpp

+------+-------+-------------+
| name | value | description |
+======+=======+=============+
| none | 0     |             |
+------+-------+-------------+
| tcp  | 1     |             |
+------+-------+-------------+
| udp  | 2     |             |
+------+-------+-------------+



.. raw:: html

	<a name="protocol_version"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+protocol_version&labels=documentation&body=Documentation+under+heading+%22enum+protocol_version%22+could+be+improved">report issue</a>]</span>



enum protocol_version
---------------------

Declared in "`libtorrent/info_hash.hpp`__"


__ include/libtorrent/info_hash.hpp

+------+-------+------------------------------------------------------------+
| name | value | description                                                |
+======+=======+============================================================+
| V1   | 0     | The original BitTorrent version, using SHA-1 hashes        |
|      |       |                                                            |
+------+-------+------------------------------------------------------------+
| V2   | 1     | Version 2 of the BitTorrent protocol, using SHA-256 hashes |
|      |       |                                                            |
+------+-------+------------------------------------------------------------+
| NUM  | 2     |                                                            |
+------+-------+------------------------------------------------------------+



.. raw:: html

	<a name="socket_type_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:enum+socket_type_t&labels=documentation&body=Documentation+under+heading+%22enum+socket_type_t%22+could+be+improved">report issue</a>]</span>



enum socket_type_t
------------------

Declared in "`libtorrent/socket_type.hpp`__"


__ include/libtorrent/socket_type.hpp

+------------+-------+-------------+
| name       | value | description |
+============+=======+=============+
| tcp        | 0     |             |
+------------+-------+-------------+
| socks5     | 1     |             |
+------------+-------+-------------+
| http       | 2     |             |
+------------+-------+-------------+
| utp        | 3     |             |
+------------+-------+-------------+
| i2p        | 4     |             |
+------------+-------+-------------+
| tcp_ssl    | 5     |             |
+------------+-------+-------------+
| socks5_ssl | 6     |             |
+------------+-------+-------------+
| http_ssl   | 7     |             |
+------------+-------+-------------+
| utp_ssl    | 8     |             |
+------------+-------+-------------+



.. raw:: html

	<a name="torrent_flags_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:torrent_flags_t&labels=documentation&body=Documentation+under+heading+%22torrent_flags_t%22+could+be+improved">report issue</a>]</span>



torrent_flags_t
---------------

Declared in "`libtorrent/torrent_flags.hpp`__"


__ include/libtorrent/torrent_flags.hpp

.. raw:: html

	<a name="torrent_flags_t::seed_mode"></a>

seed_mode
	If ``seed_mode`` is set, libtorrent will assume that all files
	are present for this torrent and that they all match the hashes in
	the torrent file. Each time a peer requests to download a block,
	the piece is verified against the hash, unless it has been verified
	already. If a hash fails, the torrent will automatically leave the
	seed mode and recheck all the files. The use case for this mode is
	if a torrent is created and seeded, or if the user already know
	that the files are complete, this is a way to avoid the initial
	file checks, and significantly reduce the startup time.
	
	Setting ``seed_mode`` on a torrent without metadata (a
	.torrent file) is a no-op and will be ignored.
	
	It is not possible to *set* the ``seed_mode`` flag on a torrent after it has
	been added to a `session`__. It is possible to *clear* it though.
	

	__ reference-Session.html#session

.. raw:: html

	<a name="torrent_flags_t::upload_mode"></a>

upload_mode
	If ``upload_mode`` is set, the torrent will be initialized in
	upload-mode, which means it will not make any piece requests. This
	state is typically entered on disk I/O errors, and if the torrent
	is also auto managed, it will be taken out of this state
	periodically (see ``settings_pack::optimistic_disk_retry``).
	
	This mode can be used to avoid race conditions when
	adjusting priorities of pieces before allowing the torrent to start
	downloading.
	
	If the torrent is auto-managed (``auto_managed``), the torrent
	will eventually be taken out of upload-mode, regardless of how it
	got there. If it's important to manually control when the torrent
	leaves upload mode, don't make it auto managed.
	


.. raw:: html

	<a name="torrent_flags_t::share_mode"></a>

share_mode
	determines if the torrent should be added in *share mode* or not.
	Share mode indicates that we are not interested in downloading the
	torrent, but merely want to improve our share ratio (i.e. increase
	it). A torrent started in share mode will do its best to never
	download more than it uploads to the swarm. If the swarm does not
	have enough demand for upload capacity, the torrent will not
	download anything. This mode is intended to be safe to add any
	number of torrents to, without manual screening, without the risk
	of downloading more than is uploaded.
	
	A torrent in share mode sets the priority to all pieces to 0,
	except for the pieces that are downloaded, when pieces are decided
	to be downloaded. This affects the progress bar, which might be set
	to "100% finished" most of the time. Do not change file or piece
	priorities for torrents in share mode, it will make it not work.
	
	The share mode has one setting, the share ratio target, see
	``settings_pack::share_mode_target`` for more info.
	


.. raw:: html

	<a name="torrent_flags_t::apply_ip_filter"></a>

apply_ip_filter
	determines if the IP filter should apply to this torrent or not. By
	default all torrents are subject to filtering by the IP filter
	(i.e. this flag is set by default). This is useful if certain
	torrents needs to be exempt for some reason, being an auto-update
	torrent for instance.
	


.. raw:: html

	<a name="torrent_flags_t::paused"></a>

paused
	specifies whether or not the torrent is paused. i.e. it won't connect to the tracker or any of the peers
	until it's resumed. Note that a paused torrent that also has the
	auto_managed flag set can be started at any time by libtorrent's queuing
	logic. See `queuing`__.
	

	__ manual-ref.html#queuing

.. raw:: html

	<a name="torrent_flags_t::auto_managed"></a>

auto_managed
	If the torrent is auto-managed (``auto_managed``), the torrent
	may be resumed at any point, regardless of how it paused. If it's
	important to manually control when the torrent is paused and
	resumed, don't make it auto managed.
	
	If ``auto_managed`` is set, the torrent will be queued,
	started and seeded automatically by libtorrent. When this is set,
	the torrent should also be started as paused. The default queue
	order is the order the torrents were added. They are all downloaded
	in that order. For more details, see `queuing`__.
	

	__ manual-ref.html#queuing

.. raw:: html

	<a name="torrent_flags_t::duplicate_is_error"></a>

duplicate_is_error
	used in `add_torrent_params`__ to indicate that it's an error to attempt
	to add a torrent that's already in the `session`__. If it's not considered an
	error, a handle to the existing torrent is returned.
	This flag is not saved by `write_resume_data()`__, since it is only meant for
	adding torrents.
	

	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Session.html#session
	__ reference-Resume_Data.html#write_resume_data()

.. raw:: html

	<a name="torrent_flags_t::update_subscribe"></a>

update_subscribe
	on by default and means that this torrent will be part of state
	updates when calling `post_torrent_updates()`__.
	This flag is not saved by `write_resume_data()`__.
	

	__ reference-Session.html#post_torrent_updates()
	__ reference-Resume_Data.html#write_resume_data()

.. raw:: html

	<a name="torrent_flags_t::super_seeding"></a>

super_seeding
	sets the torrent into super seeding/initial seeding mode. If the torrent
	is not a seed, this flag has no effect.
	


.. raw:: html

	<a name="torrent_flags_t::sequential_download"></a>

sequential_download
	sets the sequential download state for the torrent. In this mode the
	piece picker will pick pieces with low index numbers before pieces with
	high indices. The actual pieces that are picked depend on other factors
	still, such as which pieces a peer has and whether it is in parole mode
	or "prefer whole pieces"-mode. Sequential mode is not ideal for streaming
	media. For that, see `set_piece_deadline()`__ instead.
	

	__ reference-Torrent_Handle.html#set_piece_deadline()

.. raw:: html

	<a name="torrent_flags_t::stop_when_ready"></a>

stop_when_ready
	When this flag is set, the torrent will *force stop* whenever it
	transitions from a non-data-transferring state into a data-transferring
	state (referred to as being ready to download or seed). This is useful
	for torrents that should not start downloading or seeding yet, but want
	to be made ready to do so. A torrent may need to have its files checked
	for instance, so it needs to be started and possibly queued for checking
	(auto-managed and started) but as soon as it's done, it should be
	stopped.
	
	*Force stopped* means auto-managed is set to false and it's paused. As
	if the auto_manages flag is cleared and the paused flag is set on the torrent.
	
	Note that the torrent may transition into a downloading state while
	setting this flag, and since the logic is edge triggered you may
	miss the edge. To avoid this race, if the torrent already is in a
	downloading state when this call is made, it will trigger the
	stop-when-ready immediately.
	
	When the stop-when-ready logic fires, the flag is cleared. Any
	subsequent transitions between downloading and non-downloading states
	will not be affected, until this flag is set again.
	
	The behavior is more robust when setting this flag as part of adding
	the torrent. See `add_torrent_params`__.
	
	The stop-when-ready flag fixes the inherent race condition of waiting
	for the `state_changed_alert`__ and then call `pause()`__. The download/seeding
	will most likely start in between posting the `alert`__ and receiving the
	call to pause.
	
	A downloading state is one where peers are being connected. Which means
	just downloading the metadata via the ``ut_metadata`` extension counts
	as a downloading state. In order to stop a torrent once the metadata
	has been downloaded, instead set all file priorities to dont_download
	

	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Alerts.html#state_changed_alert
	__ reference-Torrent_Handle.html#pause()
	__ reference-Alerts.html#alert

.. raw:: html

	<a name="torrent_flags_t::override_trackers"></a>

override_trackers
	when this flag is set, the tracker list in the `add_torrent_params`__
	object override any trackers from the torrent file. If the flag is
	not set, the trackers from the `add_torrent_params`__ object will be
	added to the list of trackers used by the torrent.
	This flag is set by `read_resume_data()`__ if there are trackers present in
	the resume data file. This effectively makes the trackers saved in the
	resume data take precedence over the original trackers. This includes if
	there's an empty list of trackers, to support the case where they were
	explicitly removed in the previous `session`__.
	This flag is not saved by `write_resume_data()`__
	

	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Resume_Data.html#read_resume_data()
	__ reference-Session.html#session
	__ reference-Resume_Data.html#write_resume_data()

.. raw:: html

	<a name="torrent_flags_t::override_web_seeds"></a>

override_web_seeds
	If this flag is set, the web seeds from the `add_torrent_params`__
	object will override any web seeds in the torrent file. If it's not
	set, web seeds in the `add_torrent_params`__ object will be added to the
	list of web seeds used by the torrent.
	This flag is set by `read_resume_data()`__ if there are web seeds present in
	the resume data file. This effectively makes the web seeds saved in the
	resume data take precedence over the original ones. This includes if
	there's an empty list of web seeds, to support the case where they were
	explicitly removed in the previous `session`__.
	This flag is not saved by `write_resume_data()`__
	

	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Add_Torrent.html#add_torrent_params
	__ reference-Resume_Data.html#read_resume_data()
	__ reference-Session.html#session
	__ reference-Resume_Data.html#write_resume_data()

.. raw:: html

	<a name="torrent_flags_t::need_save_resume"></a>

need_save_resume
	if this flag is set (which it is by default) the torrent will be
	considered needing to save its resume data immediately as it's
	added. New torrents that don't have any resume data should do that.
	This flag is cleared by a successful call to `save_resume_data()`__
	This flag is not saved by `write_resume_data()`__, since it represents an
	ephemeral state of a running torrent.
	

	__ reference-Torrent_Handle.html#save_resume_data()
	__ reference-Resume_Data.html#write_resume_data()

.. raw:: html

	<a name="torrent_flags_t::disable_dht"></a>

disable_dht
	set this flag to disable DHT for this torrent. This lets you have the DHT
	enabled for the whole client, and still have specific torrents not
	participating in it. i.e. not announcing to the DHT nor picking up peers
	from it.
	


.. raw:: html

	<a name="torrent_flags_t::disable_lsd"></a>

disable_lsd
	set this flag to disable local service discovery for this torrent.
	


.. raw:: html

	<a name="torrent_flags_t::disable_pex"></a>

disable_pex
	set this flag to disable peer exchange for this torrent.
	


.. raw:: html

	<a name="torrent_flags_t::no_verify_files"></a>

no_verify_files
	if this flag is set, the resume data will be assumed to be correct
	without validating it against any files on disk. This may be used when
	restoring a `session`__ by loading resume data from disk. It will save time
	and also delay any hard disk errors until files are actually needed. If
	the resume data cannot be trusted, or if a torrent is added for the first
	time to some save path that may already have some of the files, this flag
	should not be set.
	

	__ reference-Session.html#session

.. raw:: html

	<a name="torrent_flags_t::default_dont_download"></a>

default_dont_download
	default all file priorities to dont_download. This is useful for adding
	magnet links where the number of files is unknown, but the
	file_priorities is still set for some files. Any file not covered by
	the file_priorities list will be set to normal download priority,
	unless this flag is set, in which case they will be set to 0
	(dont_download).
	


.. raw:: html

	<a name="torrent_flags_t::all"></a>

all
	all torrent flags combined. Can conveniently be used when creating masks
	for flags
	



.. raw:: html

	<a name="pex_flags_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:pex_flags_t&labels=documentation&body=Documentation+under+heading+%22pex_flags_t%22+could+be+improved">report issue</a>]</span>



pex_flags_t
-----------

Declared in "`libtorrent/pex_flags.hpp`__"


__ include/libtorrent/pex_flags.hpp

.. raw:: html

	<a name="pex_flags_t::pex_encryption"></a>

pex_encryption
	the peer supports protocol encryption
	


.. raw:: html

	<a name="pex_flags_t::pex_seed"></a>

pex_seed
	the peer is a seed
	


.. raw:: html

	<a name="pex_flags_t::pex_utp"></a>

pex_utp
	the peer supports the uTP, transport protocol over UDP.
	


.. raw:: html

	<a name="pex_flags_t::pex_holepunch"></a>

pex_holepunch
	the peer supports the holepunch extension If this flag is received from a
	peer, it can be used as a rendezvous point in case direct connections to
	the peer fail
	


.. raw:: html

	<a name="pex_flags_t::pex_lt_v2"></a>

pex_lt_v2
	protocol v2
	this is not a standard flag, it is only used internally
	



.. raw:: html

	<a name="int"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:int&labels=documentation&body=Documentation+under+heading+%22int%22+could+be+improved">report issue</a>]</span>



int
---

Declared in "`libtorrent/version.hpp`__"


__ include/libtorrent/version.hpp

.. raw:: html

	<a name="int::version_major"></a>

version_major
	the major, minor and tiny versions of libtorrent
	


.. raw:: html

	<a name="int::version_minor"></a>

version_minor
	the major, minor and tiny versions of libtorrent
	


.. raw:: html

	<a name="int::version_tiny"></a>

version_tiny
	the major, minor and tiny versions of libtorrent
	



.. raw:: html

	<a name="char const*"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:char+const%2A&labels=documentation&body=Documentation+under+heading+%22char+const%2A%22+could+be+improved">report issue</a>]</span>



char const*
-----------

Declared in "`libtorrent/version.hpp`__"


__ include/libtorrent/version.hpp

.. raw:: html

	<a name="char const*::version_str"></a>

version_str
	the libtorrent version in string form
	



.. raw:: html

	<a name="std::uint64_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:std%3A%3Auint64_t&labels=documentation&body=Documentation+under+heading+%22std%3A%3Auint64_t%22+could+be+improved">report issue</a>]</span>



std::uint64_t
-------------

Declared in "`libtorrent/version.hpp`__"


__ include/libtorrent/version.hpp

.. raw:: html

	<a name="std::uint64_t::version_revision"></a>

version_revision
	the git commit of this libtorrent version
	



.. raw:: html

	<a name="download_priority_t"></a>

.. raw:: html

	<span class="report-issue">[<a href="http://github.com/arvidn/libtorrent/issues/new?title=docs:download_priority_t&labels=documentation&body=Documentation+under+heading+%22download_priority_t%22+could+be+improved">report issue</a>]</span>



download_priority_t
-------------------

Declared in "`libtorrent/download_priority.hpp`__"


__ include/libtorrent/download_priority.hpp

.. raw:: html

	<a name="download_priority_t::dont_download"></a>

dont_download
	Don't download the file or piece. Partial pieces may still be downloaded when
	setting file priorities.
	


.. raw:: html

	<a name="download_priority_t::default_priority"></a>

default_priority
	The default priority for files and pieces.
	


.. raw:: html

	<a name="download_priority_t::low_priority"></a>

low_priority
	The lowest priority for files and pieces.
	


.. raw:: html

	<a name="download_priority_t::top_priority"></a>

top_priority
	The highest priority for files and pieces.
	





.. _`BEP 3`: https://www.bittorrent.org/beps/bep_0003.html
.. _`BEP 17`: https://www.bittorrent.org/beps/bep_0017.html
.. _extensions: manual-ref.html#extensions
.. _`BEP 52`: https://www.bittorrent.org/beps/bep_0052.html
.. _`BEP 19`: https://www.bittorrent.org/beps/bep_0019.html
.. _`BEP 38`: https://www.bittorrent.org/beps/bep_0038.html
.. _`rate based choking`: manual-ref.html#rate-based-choking
.. _`BEP 42`: https://www.bittorrent.org/beps/bep_0042.html
