Commit Graph

76 Commits

Author SHA1 Message Date
arvidn 4947602a2f make add_torrent_params::flags_t an enum class and move it out into its own header 2017-07-17 01:05:31 -07:00
arvidn 4eb5155263 use span<> for peer_connection::send_buffer 2017-04-25 23:02:32 -04:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
arvidn 79d7ae3638 separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class 2017-04-11 18:07:55 -04:00
Arvid Norberg 64ad4f5c96 enable warnings when building tests (#1880) 2017-04-02 14:22:17 -04:00
Alden Torres 3803661863 moved alloca.hpp to private aux_ and size refactor (#1634)
moved alloca.hpp to private aux_ and size refactor
2017-01-27 12:43:34 -05:00
Arvid Norberg 57f52adc88 various cleanup (#1497)
* various cleanup

* fix

* cleanup
2017-01-06 01:39:01 -05:00
arvidn a087a283de make tests print to stdout instead of stderr 2017-01-02 11:28:41 -05:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
Arvid Norberg 54f052a97b allocation slot type (#1352)
use a specialized type for allocation slot indices
2016-11-26 03:09:01 -05:00
Steven Siloti a6e5ba8804 return a span from TORRENT_ALLOCA (#1244)
return a span from TORRENT_ALLOCA

Unfortunately this requires moving the variable declaration inside the macro.
Due to alloca’s unique properties pretty much the only safe way to call it is
in a simple assign-to-pointer expression. Therefor we need to use a temporary
pointer to store the value returned from alloca before we can call span’s ctor.

This also causes double evaluation of the size parameter which is unfortunate,
but no current callers of TORRENT_ALLOCA have a problem with this. Passing
expressions with side effects to macros is bad mojo anyways.
2016-10-22 14:43:40 -04:00
arvidn 6c805bd06d simplify print statements in tests 2016-10-09 20:23:45 -04:00
Alden Torres bf0008933a refactor to use std::shared_ptr with peer_connection, core and tests (#1050) 2016-08-31 21:42:18 -04:00
Alden Torres bb388563b3 refactor to use torrent_info with std::shared_ptr (#1006) 2016-08-17 17:26:35 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
arvidn f5bb8c4b77 improve test robustness 2016-07-01 00:24:52 -04:00
Arvid Norberg eda956f13a use standard library for suspending threads (#855)
use standard library for suspending threads
2016-06-26 09:24:06 -04:00
arvidn db73946564 fix 2016-06-14 21:16:39 -04:00
arvidn 4b186130e6 fix merge 2016-06-14 21:16:28 -04:00
Arvid Norberg 4e0a4db9b4 fixed inverted priority of incoming piece suggestions (#809) 2016-06-12 20:36:05 -04:00
Arvid Norberg 404d72b9b7 revert handshake round-trip optimization (#797)
revert handshake round-trip optimization. it prevents taking advantage of FAST extensions since the bitfield is sent before receiving the other peer's handshake
2016-06-10 01:14:37 -04:00
Arvid Norberg 5eaf713d1f revert handshake round-trip optimization (#797)
revert handshake round-trip optimization. it prevents taking advantage of FAST extensions since the bitfield is sent before receiving the other peer's handshake
2016-06-07 21:45:48 -04:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Andrei Kurushin 62eb956c54 fix x64 build with VS2015 UP2 compiler (#640)
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Arvid Norberg 7251575d98 This patch does: (#633)
1. simplifies and regularizies creation of listen sockets based on the listen
   interfaces setting.
2. simplifies and improves the behavior of UDP sockets, which are now explicitly
   opened per listen interface
3. transitions udp tracker, DHT and uTP socket manager over to using the new
   udp sockets
4. greatly simplified udp_socket to only wrap a single underlying socket (as
   opposed to one IPv4 and IPv6 socket)
5. improved behavior of bind-to-device
6. introduce an array_view type to make udp packet passing code simpler
7. simplify and make setting of DF flag more robust
8. simplify and regularize port mapping of listen sockets
2016-04-24 15:26:28 -04:00
Andrei Kurushin c41ab094be fix release build with VS2015 UP2 compiler warnings for: examples, test, tools (#627)
fix release build with VS2015 UP2 compiler warnings for: examples, test, tools
2016-04-20 00:45:32 -04:00
arvidn a138b2daa9 handle receiving an invalid request 2015-11-07 14:58:08 -05:00
arvidn b628692223 separate out announce_entry and torrent_status into their own headers 2015-09-18 08:08:08 -04:00
arvidn 17c5759829 disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings 2015-09-06 22:55:41 -04:00
arvidn 6012306557 add more asserts for the size of the bitfields peers send 2015-08-27 21:48:52 -04:00
arvidn 4224310c6f disable tests of extensions when they are disabled by the build config 2015-06-14 21:19:27 -04:00
arvidn db76ba759d improve some tests 2015-06-14 15:48:11 -04:00
arvidn 3f3b7d494c disable some redundant features in tests to make them not interfere with the test itself 2015-06-07 17:54:08 -04:00
arvidn 72d3bc0b8e split up test_fast_extension into multiple test cases 2015-06-07 15:31:34 -04:00
arvidn 9af8841244 remove some unnecessary asio typedefs in the libtorrent namespace, just pull ip::tcp and ip::udp 2015-06-06 13:49:18 -04:00
arvidn 389ffc622c don't pull in the asio namespace in libtorrent. refer to it by boost::asio 2015-06-06 01:24:25 -04:00
arvidn 15dd15d0d6 fix no-deprecated build. extend .travis.yml to build the 3 test configurations too. rename README to README.rst 2015-06-05 02:31:52 -04:00
Arvid Norberg 84849f3afd some msvc fixes 2015-05-30 21:46:59 +00:00
Arvid Norberg f9c9d0ad0d merge small unit tests to make running the tests quicker. expand the test framework a bit. add ax_boost_random.m4 script to link against boost.random correctly from makefile. 2015-05-30 04:31:23 +00:00
Arvid Norberg 3ea67e2bf5 move time_now_string out to the unit test library (basically unused in libtorrent itself) 2015-04-24 03:48:08 +00:00
Arvid Norberg 60d1b8fa7c fix gcc build 2015-04-18 21:21:22 +00:00
Arvid Norberg b148f21314 fix typo in test 2015-04-12 02:54:43 +00:00
Arvid Norberg 8e6efd7fea fix 2015-04-12 00:39:07 +00:00
Arvid Norberg 55a9e98dd0 extend test_alert_manager and clean up test_fast_extension and extend a little bit 2015-04-12 00:14:07 +00:00
Arvid Norberg 6f839a6d66 extend some unit tests. primarily test_alert_manager and fixed a bug in alert_manager 2015-04-11 22:02:30 +00:00
Arvid Norberg b3e061ca94 clean up of some test and fix warnings 2015-04-11 15:25:24 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +00:00
Arvid Norberg c1dc982f4f deprecate the ptime type and related time types. just use boost::chrono / std::chrono 2015-03-12 04:34:54 +00:00