Commit Graph

408 Commits

Author SHA1 Message Date
Alden Torres 1f86beb253 ask for protocol instead of copy address in ut_pex_peer_store::was_introduced_by 2018-03-07 09:44:45 +01:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
arvidn 24dea1f845 fix tie-break in duplicate peer connection disconnect logic 2018-02-21 21:04:28 +01:00
Alden Torres 3261eea63a more use of emplace and minor code refactor in bt_peer_connection.cpp 2018-02-02 21:53:48 +01:00
arvidn e126d7bce0 move socket_type into aux-namespace 2018-01-29 08:33:45 +01:00
arvidn 4fef787212 merged RC_1_1 into master 2018-01-24 00:37:05 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
Pavel Pimenov 97ceeab9e3 fix V821 Decreased performance. (#2675)
The 't' variable can be constructed in a lower level scope
2018-01-07 20:37:21 -05:00
pavel.pimenov bad0f01e07 remove #include boost/multiprecision 2018-01-06 09:24:48 -05:00
arvidn d22c44c057 fix kludge and down-cast to send upload_only. Promote upload-only to a top-level peer feature 2017-09-23 07:51:51 -07:00
Alden Torres 1d9b10a32b fix warning for Xcode 9, added const and minor code refactor to bt_peer_connection.cpp 2017-09-22 04:46:16 -07:00
arvidn 93bb84d94c some random cleanup 2017-09-13 08:28:46 +02:00
Steven Siloti df8a57efb7 select which DHT port to report based on the connection's local endpoint (#2316) 2017-09-10 10:25:04 +02:00
arvidn 1290e6f5af simplify buffer handling in rc4_decrypt calls 2017-08-23 07:01:12 +02:00
arvidn 22c047f8a0 factor out and simplify get_syncoffset 2017-08-23 06:59:44 +02:00
Alden Torres 5130827fc7 minor code refactor and cleanup in bt_peer_connection (#2261) 2017-08-21 11:00:00 +02:00
toinetoine b1c3e12cd0 added block_uploaded_alert to allow client to track upload activity 2017-07-16 11:04:03 -07:00
arvidn f85c01cc0a merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
arvidn 53cbb607d0 first steps towards spell checking documentation 2017-06-17 22:59:57 -04:00
arvidn 1fd350cf60 make operation_t an enum class, for type safety 2017-06-15 07:00:06 -04:00
Alden Torres 4ea318faa0 compilation fix when not TORRENT_ASSERT 2017-04-26 13:46:35 -04:00
arvidn 4eb5155263 use span<> for peer_connection::send_buffer 2017-04-25 23:02:32 -04:00
Steven Siloti 761436dc97 add support for utp over multiple interfaces (#1944) 2017-04-25 23:00:41 -04:00
Andrei Kurushin 027fa5e290 fix MSVC 14.1 warnings-as-errors=on build (#1939) 2017-04-23 20:52:37 -04:00
arvidn 8eafd84273 merge send_message utility functions in bt_peer_connections into a template 2017-04-19 22:27:30 -04:00
Pavel Pimenov 9ebbcc2d69 add send_*_message (#1922)
factor out common message sending code in bt_peer_connection
2017-04-17 16:26:16 -04:00
Pavel Pimenov 7d09dba14e add const (#1917) 2017-04-16 07:27:47 -04:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
pavel.pimenov 78442e9a2c bdecode_node - add const 2017-02-27 19:44:12 -05:00
Alden Torres de6f2a9d88 fixing sign-conversion warnings, part 11, created aux::array and refactor (#1649)
fixing sign-conversion warnings, part 11, created aux::array and refactor
2017-02-04 22:05:53 -05:00
Alden Torres d36c598eeb fixing sign-conversion warnings, part 10 (#1642)
fixing sign-conversion warnings, part 10
2017-01-30 20:31:32 -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
Alden Torres 070e85090b more std:: prefix, consts, auto refactor, formatting 2017-01-26 08:30:20 -05:00
Andrei Kurushin 7c9679bf6a fix missed static array specifier 2017-01-23 08:21:34 -05:00
Andrei Kurushin 06c68052b4 fix missed static array specifier 2017-01-22 13:39:10 -05:00
arvidn 23a7e8d40a hide the block_cache_reference from disk_buffer_holder 2016-12-31 10:31:54 -05:00
Arvid Norberg af126fe507 make buffer_allocator_interface an implementation detail of the disk_io_thread (#1463)
make buffer_allocator_interface an implementation detail of the disk_io_thread by using disk_buffer_holder in the disk interface. make chained_buffer use holders instead of free deleter functions and userdata to support putting disk_buffer_holder objects in there. Also make the session buffers be held by holders
2016-12-28 17:47:18 -08:00
Alden Torres 75f307c187 minor cleanup and refactor in peer connection 2016-12-22 17:48:47 -05:00
Pavel Pimenov 6afb1f3e83 aux::to_hex(sha1) -> sha1.to_hex() (#1418)
generate hex strings into std::string instead of stack-allocated char arrays
2016-12-22 10:44:36 -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
Pavel Pimenov e3c5a639ca Add bt_peer_connection::write_dht_port() (#1360)
add void bt_peer_connection::write_dht_port()
2016-11-29 08:11:13 -05:00
arvidn 0f38acf829 don't send dht-port if we don't have a udp listen socket 2016-11-27 21:22:11 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -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
arvidn d5b76d2237 move block_cache_reference out of disk_io_job header 2016-11-20 10:34:42 -05:00
Arvid Norberg 1c2a8fb96e move coalescing of reclaim block from disk_io_thread to session_impl (#1281) 2016-10-31 23:48:30 -04:00
arvidn 500bb24dba merged RC_1_1 into master 2016-10-26 23:30:58 -04:00
Arvid Norberg 61af222d92 add utility function for generating peer ID fingerprint (#1249)
add utility function for generating peer ID fingerprint
2016-10-25 08:03:26 -04: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 b1e22e6183 merged RC_1_1 into master 2016-10-20 00:36:54 -04:00