libtorrent with premiere torrent support
Go to file
Steven Siloti 0a9e2c965d invert logic in read_nl_sock for better clarity and reliability (#2101)
The seq and pid parameter are apparently used as a safety check in case
a stream of netlink messages is not properly terminated. I initially thought
that they represented the expected values of the incoming messages.
Instead seq is set to one-past the expected value and the loop aborts when
seq and pid match the message.

Inverting the logic so that reading continues as long as the seq and pid match
the incoming messages is, to me at least, more intuitive. It is also more
reliable since it does not rely on the next seq being strictly sequential. It
also catches unexpected messages preceding or interleaved with the expected
messages.

There seems to be a lot of confusion all across the internet over the
nlmsg_pid field. The changes here were made based on examination of the
kernel source and iproute2 (a common user of netlink).

The kernel does not read nlmsg_pid at all for routing messages.
Iproute2 sets it to zero unconditionally so I changed this code to do the same.
2017-06-25 10:29:32 -04:00
.github add contributing and issue template 2016-04-14 19:06:52 -04:00
bindings convert remaining alerts to use operation_t instead of string literal 2017-06-18 22:05:50 -04:00
cmake/Modules Fix compilation with cmake (#767) 2016-05-29 12:58:16 -04:00
docs merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
ed25519 move const data to readonly segment 2017-01-09 14:41:44 -05:00
examples merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
include/libtorrent factor out has_any_file to storage_utils 2017-06-23 16:33:48 -04:00
m4 merged RC_1_1 into master 2016-12-20 01:16:13 -05:00
simulation unify some operation-enums and strings to use operation_t 2017-06-18 07:31:45 -04:00
src invert logic in read_nl_sock for better clarity and reliability (#2101) 2017-06-25 10:29:32 -04:00
test merged RC_1_1 into master 2017-06-24 12:37:13 -04:00
tools introduce lt namespace alias 2017-04-23 23:43:58 -04:00
.gitignore merge RC_1_1 into master 2017-02-12 02:24:14 -05:00
.gitmodules add .gitmodules 2015-08-07 23:19:37 -04:00
.travis.yml merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
AUTHORS update acknowledgements on front page 2016-11-27 09:34:09 -05:00
CMakeLists.txt implemented support for BEP 51 (#1652) 2017-06-12 11:54:11 +02:00
CONTRIBUTING.rst update changelog and update contributing document 2016-04-24 15:33:14 -04:00
COPYING merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
ChangeLog merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
Jamfile implemented support for BEP 51 (#1652) 2017-06-12 11:54:11 +02:00
Jamroot.jam add Jamroot.jam 2012-06-14 05:43:10 +00:00
LICENSE merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
Makefile.am merge RC_1_1 into master 2017-03-08 18:01:59 -05:00
NEWS polishing, update copyright 2014-07-02 07:17:50 +00:00
README.rst add contributing and issue template 2016-04-14 19:06:52 -04:00
appveyor.yml merged RC_1_1 into master 2017-02-17 00:35:49 -05:00
autotool.sh Fix autotool.sh warning if builddir exists 2017-01-14 09:19:23 -05:00
bootstrap.sh merged bootstrap.sh script from RC_0_16 2013-05-29 02:11:15 +00:00
build_dist.sh merged RC_1_1 into master 2016-09-11 21:01:03 -04:00
configure.ac default to a template depth limit of 512 2017-04-23 19:49:49 -04:00
libtorrent-rasterbar-cmake.pc.in don't add to pkg-config. #462 2009-01-07 02:22:58 +00:00
libtorrent-rasterbar.pc.in merged fixes from RC_0_16 2013-09-07 21:27:07 +00:00
setup.py Fixup python code in bindings to pass PEP8 codestyle 2017-01-21 00:21:54 -05:00

README.rst

libtorrent
----------

.. image:: https://travis-ci.org/arvidn/libtorrent.svg?branch=master
    :target: https://travis-ci.org/arvidn/libtorrent

.. image:: https://ci.appveyor.com/api/projects/status/w7teauvub5813mew/branch/master?svg=true
    :target: https://ci.appveyor.com/project/arvidn/libtorrent/branch/master

.. image:: https://codecov.io/github/arvidn/libtorrent/coverage.svg?branch=master
    :target: https://codecov.io/github/arvidn/libtorrent?branch=master&view=all#sort=missing&dir=desc

.. image:: https://www.openhub.net/p/rasterbar-libtorrent/widgets/project_thin_badge.gif
    :target: https://www.openhub.net/p/rasterbar-libtorrent?ref=sample

libtorrent is an open source C++ library implementing the BitTorrent protocol,
along with most popular extensions, making it suitable for real world
deployment. It is configurable to be able to fit both servers and embedded
devices.

The main goals of libtorrent are to be efficient and easy to use.

See `libtorrent.org`__ for more detailed build and usage instructions.

.. __: http://libtorrent.org

To build with boost-build, make sure boost and boost-build is installed and run:

   b2

In the libtorrent root. To build the examples, run ``b2`` in the ``examples``
directory.

See `building.html`__ for more details on how to build and which configuration
options are available. For python bindings, see `the python docs`__.

.. __: docs/building.rst
.. __: docs/python_binding.rst