Commit Graph

192 Commits

Author SHA1 Message Date
Alden Torres a2ea79de4e minor code refactor in utp related code, more use of const 2018-06-12 11:41:32 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
V.G. Bulavintsev c08a6bf430 Make SACK header to be able to take up the whole packet. Rename m_in_buf_size to m_receive_buffer_capacity 2018-04-07 18:55:14 +02:00
V.G. Bulavintsev 257f625e2e Increase m_in_buf_size and max_packet_reorder to better handle links with high latency 2018-04-07 18:55:14 +02:00
V.G. Bulavintsev bf2f0a9c55 Fix advertised window being counted twice in congestion check 2018-04-07 18:55:14 +02:00
arvidn 8a85e1c01a merged RC_1_1 into master 2018-03-21 12:17:11 +01:00
arvidn 09bf97b79e minor fixes in utp_socket_impl 2018-03-18 17:03:05 +01:00
arvidn e81eaf5935 minor cleanup in uTP code 2018-02-21 10:07:22 +01:00
arvidn 65fef972a2 apply some c++11 modernization 2018-01-11 04:51:39 -05:00
Alden Torres 6409cb42e1 fix implicit-fallthrough warnings with gcc 7 2017-10-23 19:18:33 +02:00
arvidn 7717c02c2f run sonarqube with deprecated functions disabled. fix some of its code smells 2017-09-17 18:06:53 +02:00
Alden Torres 48de05ba82 lint-based code review in utp related code 2017-08-13 07:49:43 +02:00
arvidn 8d0f38930e make udp send flags type safe 2017-07-26 18:09:17 -07:00
Steven Siloti 761436dc97 add support for utp over multiple interfaces (#1944) 2017-04-25 23:00:41 -04:00
Alden Torres 0132221031 minor code cleanup, std:: prefix, consts, typos 2017-04-04 23:12:48 -04:00
Andrei Kurushin 713c412682 loop conversion #2 (#1804)
loop conversions. replace unsafe "erase(iter++)" with "iter = erase(iter)"
2017-03-12 11:34:42 -04:00
Alden Torres 3764ee62cb fixing sign-conversion warnings, part 23, final (#1763)
fixing sign-conversion warnings, part 23, final
2017-02-27 11:50:53 -05:00
Alden Torres de9d777c9c fixing sign-conversion warnings, part 22 2017-02-26 15:37:45 -05:00
Alden Torres 847792854d fixing sign-conversion warnings, part 20 (#1745)
fixing sign-conversion warnings, part 20
2017-02-22 23:28:25 -05:00
arvidn c8c605554a remove out-parameters from utp stream 2017-02-19 09:44:32 -05:00
arvidn 9dd48e88a4 make the utp_socket_manager a reference instead of a pointer in utp_stream 2017-02-18 22:44:53 -05:00
Alden Torres bdc37ed619 fixing sign-conversion warnings, part 17, utp_stream (#1700)
fixing sign-conversion warnings, part 17, utp_stream
2017-02-18 06:52:46 -05:00
Alden Torres 0b4bd75731 fix move related pointer issue in utp_socket_impl::consume_incoming_data 2017-02-12 21:19:27 -05:00
arvidn ee2688b83a use unique_ptr for packets in utp_stream 2017-02-11 17:11:49 -05:00
Andrei Kurushin 76f91c3fc9 packet allocation pool (#1600)
packet allocation pool:
- no more direct malloc/free with cast
- reuse allocated memory for 3 common allocation case (with limit)
- access to packet_pool through utp_socket_manager instance
2017-02-10 08:25:03 -05:00
arvidn 34ecb60c09 use enum class for close reason 2017-02-04 11:24:35 -05: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
Andrei Kurushin fffdd4703d make handler exchange without copy->clone mem allocation (#1583)
make uTP handler exchange without copy->clone mem allocation
2017-01-20 19:03:20 -05:00
Andrei Kurushin 1ec5c69dcd minor code corrections (#1430)
use compact span cast. extend split_path api with only_first_part flag. use single loadlibrary and getprocaddress for IP helper
2016-12-26 22:45:48 -08:00
Alden Torres 22b596945e enable /W4 warnings for msvc 2016-12-13 19:36:14 -05:00
Alden Torres dd7179fb10 added a few consts to arguments and local variables 2016-12-10 18:19:14 -05:00
Alden Torres 0625606230 fixing shorten-64-to-32 warnings, part 2 2016-12-06 22:53:41 -05:00
Alden Torres c30027e4a1 more integral type conversion warning fixes, now only needs shorten-64-to-32 (#1349)
more integral type conversion warning fixes, now only needs shorten-64-to-32
2016-11-25 11:17:25 -05:00
Alden Torres 84e0362180 more fixes in signed compare warnings (#1345)
more fixes in signed compare warnings
2016-11-21 01:49:56 -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
Pavel Pimenov 8c20f4e1fd utp_match: Reduced call boost::asio::ip::address address() (#1235)
check connection ID before source address in uTP connection lookup
2016-10-20 20:49:59 -04:00
arvidn 1c89fcda48 merge RC_1_1 into master 2016-10-08 14:17:51 -04:00
Arvid Norberg 5f7e2eb928 run undefined sanitier on travis/linux (#1134)
run undefined sanitizer on travis/linux. back-port ed25519 unit test from master
2016-10-08 12:29:46 -04:00
Arvid Norberg 7bfb97ba44 use in-class default initializers for utp_stream class members (#1196)
use in-class default initializers for utp_stream class members
2016-10-08 12:12:33 -04:00
arvidn 70199041f7 merged RC_1_1 into master 2016-09-22 13:48:12 -07:00
milesdong dc4d9af2e6 fix invalid memory access in utp_stream and torrent (#1084)
fix invalid memory access in uTP PMTUd
2016-09-13 02:36:23 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 71f5510d62 make the random function produce proper random distributions, based o… (#981)
make the random function produce proper random distributions, based on uniform_int_distribution of C++11. also clean up piece_picker's priority_range to return two results instead of taking pointers to out-parameters. fix recent pe-crypto regression exposed by this change
2016-08-06 13:18:48 -04:00
Alden Torres fdfe69f414 fixed warnings and compilation issues (#980)
fixed warnings and compilation issues
2016-08-03 00:35:40 -04:00
Arvid Norberg 5b230694e5 check autotools on travis (#973)
build and run tests with autotools on travis, and fix configure issues.
2016-08-02 00:46:15 -04:00
Arvid Norberg 61031f1186 hack to allow timeout utp sockets that are about to be closed (#976) 2016-08-02 00:07:36 -04:00
Alden Torres e55a310e79 use of BOOST_FALLTHROUGH, typos and minor cleanup 2016-08-01 11:42:18 -04:00
Alden Torres f57612b82d rename of aux::array_view to span (#933) 2016-07-22 09:31:42 -07:00
Arvid Norberg 8c03718117 apply modernization transforms to headers too. nullptr, explicit constructors, = default (#903) 2016-07-10 14:27:42 -04:00