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
Arvid Norberg
5012fcf10b
fix bug in last-seen-complete ( #1234 )
2016-10-20 00:15:26 -04:00
Alden Torres
8839722bec
minor http related code cleanup ( #1212 )
2016-10-14 16:12:02 -04:00
Alden Torres
acf353e26a
general session, torrent and peer connection log optimization ( #1088 )
...
general session, torrent and peer connection log optimization
2016-09-13 22:46:07 -04:00
Alden Torres
224ebc1ded
peer_connection log related optimization ( #1086 )
...
peer_connection log related optimization and making m_alert_mask atomic
2016-09-13 17:07:22 -04:00
Alden Torres
728e74eca7
refactor to avoid use of optional with piece_block_progress ( #1061 )
2016-09-04 12:31:02 -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
cdb15ba886
refactor to use std::shared_ptr with torrent ( #1048 )
2016-08-31 08:27:36 -04:00
Alden Torres
cfd2caeb74
no more extension_list_t type and uncommented call to torrent_plugin::on_load ( #1042 )
2016-08-30 17:36:44 -04:00
Arvid Norberg
9ac7475a90
simplify some constructors with in-class initializers ( #1038 )
...
simplify peer_connection, torrent and session_impl's contstructors by moving simple parts to their header files
2016-08-29 20:29:27 -04:00
Alden Torres
73d6ba6ae3
using span in torrent_handle and no optional in torrent_info ( #1023 )
2016-08-22 11:02:51 -04:00
Alden Torres
7cee486cf7
extensions refactor to use span and std::shared_ptr ( #1005 )
...
extensions refactor to use span. use std::shared_ptr instead of boost::shared_ptr.
2016-08-17 14:30:24 -04:00
Alden Torres
f4127ae12b
refactor in crypto_plugin::decrypt to use tuple
2016-08-16 10:21:17 -04:00
Alden Torres
7a2b21407c
refactor in crypto_plugin to use span
2016-08-15 23:09:30 -04:00
Alden Torres
9b0bc2ed5f
peer_plugin refactor ( #1002 )
...
refactor of ut_pex peer storage
2016-08-15 21:05:39 -04:00
Arvid Norberg
e36e5efaba
use boost::string_ref ( #996 )
...
use boost::string_ref/boost::string_view in various parts of the code, in file_storage, some file functions and in bdecode.
2016-08-13 07:04:53 -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
arvidn
83dba91168
use span for to_hex and from_hex functions
2016-07-29 18:42:18 -04:00
Alden Torres
68b1fc2fe8
fixed span::fist logic and minor cleanup ( #960 )
2016-07-28 01:54:57 -04:00
Alden Torres
98918d61f5
removed const_interval, mutable_buffer and const_buffer types ( #956 )
...
removed const_interval, mutable_buffer and const_buffer types
2016-07-27 22:31:08 -04:00
Arvid Norberg
634c2bce60
Span conversion ( #944 )
...
complete http_parser transition to use span. make xml_parse use span. remove buffer::interval. convert some of receive buffer management to use span<>
2016-07-26 02:15:31 -04:00
Alden Torres
9af2072bc9
minor changes, typos and gcc tests in windows ( #947 )
...
minor changes, typos and gcc tests in windows
2016-07-25 17:58:00 -04:00
Arvid Norberg
9c2325ff6b
modernize and improve type-safety of the DHT put implementation and test ( #929 )
...
modernize and improve type-safety of the DHT put implementation and tests. use unique_ptr instead of malloc for dht put items.
2016-07-23 15:57:04 -07:00
Alden Torres
ddb274751f
using span in crypto_plugin encrypt/decrypt ( #934 )
2016-07-23 15:54:39 -07:00
Alden Torres
f57612b82d
rename of aux::array_view to span ( #933 )
2016-07-22 09:31:42 -07:00
Arvid Norberg
7bf49c0a1c
modernize hasher to use array_view ( #931 )
...
modernize hasher to use array_view as well as adding array_view support to entry
2016-07-22 07:29:39 -07:00
arvidn
e405f0e02f
merged RC_1_1 into master
2016-07-20 11:34:29 -07:00
Arvid Norberg
5bda955f8f
don't send bitfield to peers whose handshake we haven't fully received yet ( #925 )
2016-07-20 10:11:28 -07:00
Arvid Norberg
a740a49fd6
modernize misc ( #898 )
...
modernize misc
2016-07-10 07:34:45 -04:00
Arvid Norberg
770935cd46
modernize-use-nullptr ( #894 )
2016-07-09 16:26:26 -04:00
Steven Siloti
e0c0b14e6c
limit crypto messages to 1MB ( #884 )
...
limit crypto messages to 1MB
2016-07-04 02:48:13 -04:00
Arvid Norberg
c567a66f5e
simplify peer_connection's read handlers and the receive buffer. ( #853 )
...
simplify peer_connection's read handlers and the receive buffer. removed the concept of soft-packet-size. removed the secondary null-buffer receive path. removed try_read. simplify the buffer class to not be resizeable. make receive_buffer shrink the buffer allocation. add cap to growing the receive buffer. buffer sizes are always divisible by 8.
2016-06-26 20:41:03 -04:00
Arvid Norberg
6aabe3762b
general modernization ( #836 )
...
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Arvid Norberg
a9dbbdea37
use array_view instead of std::vector in crypto_plugin interface ( #835 )
...
use array_view instead of std::vector in crypto_plugin interface. return a vector of const_buffers for prepending new buffers. use stack allocated (single buffer) iovecs for receives. general cleanup
2016-06-19 23:05:59 -04:00
Arvid Norberg
b2358666a1
remove lazy_bitfield ( #817 )
...
remove lazy_bitfield feature
2016-06-19 17:00:18 -04:00
Arvid Norberg
ed077c8358
use cstdint intead of boost/cstdint.hpp ( #833 )
...
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg
ead11737b4
fix uses of defines for whether or not asserts are active ( #832 )
2016-06-18 08:31:07 -04:00
Arvid Norberg
4d927f4029
modernize disk_buffer_holder to be move-only ( #824 )
...
modernize disk_buffer_holder to be move-only
2016-06-16 08:24:41 -04:00
Arvid Norberg
c0fb61c5d7
replace the suggest-read-cache logic with something much simpler ( #815 )
...
replace the suggest-read-cache logic with something much simpler that doesn't schedule regular jobs and doesn't query the disk cache
2016-06-15 13:29:54 -04:00
Arvid Norberg
ce161a9d62
remove option to disable contiguous receive buffers ( #818 )
...
removed option to disable contiguous receive buffers
2016-06-15 08:04:53 -04:00
Arvid Norberg
6f87c702fa
simplify dispatching of bittorrent messages ( #820 )
2016-06-14 15:19:32 -04:00
Arvid Norberg
6e55c0564f
suppress shift warnings in boost ( #811 )
...
suppress shift warnings in boost
2016-06-12 21:14:21 -04:00
arvidn
0440c57f68
fix performance issue and assert with receiving metadata
2016-06-11 23:29:33 -04:00
Arvid Norberg
327af3a69e
optimize allow-fast logic ( #800 )
...
optimize allow-fast logic
2016-06-10 01:24:37 -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
830a79dbcf
optimize allow-fast logic ( #800 )
...
optimize allow-fast logic
2016-06-09 08:02:41 -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
8c8f5bb03b
deprecated public to_hex() and from_hex() functions ( #784 )
2016-06-04 10:01:43 -04:00
Arvid Norberg
0583394af7
remove dependency on libtommath and use boost.multiprecision instead
...
remove dependency on libtommath and use boost.multiprecision instead
2016-05-30 14:33:24 -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
748af6eec1
general cleanup. remove valgrind markup, log_hash_failures and C headers ( #752 )
...
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
Arvid Norberg
c91a700c07
Msvc warnings ( #685 )
...
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -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
Andrei Kurushin
7b5d48c02a
fix default release build with VS2015 UP2 compiler warnings ( #624 )
...
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn
2178d1ad2b
improve robustness and performance of uTP PMTU discovery. fix duplicate ACK issue in uTP. demote an invariant check to 'expensive'
2016-03-13 12:40:59 -04:00
arvidn
26f88bb12d
add receive_buffer unit test and some more cleanup and asserts
2016-03-05 00:14:00 -05:00
arvidn
b9ec183e24
increase default connect speed. minor cleanup. add logging for short lived connections
2016-03-03 01:20:15 -05:00
arvidn
1f9f588e75
merge copyright year update and changelog from RC_1_0
2016-01-17 18:57:46 -05:00
arvidn
a8e31fd8ca
add first coverage of test_transfer as a proper sim
2015-11-28 00:59:39 -05:00
arvidn
c0a4f7ba26
fix super seeding assert (forward port from RC_1_0)
2015-09-08 18:17:13 -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
a42f9e0c63
fix more warnings
2015-08-22 00:28:12 +02:00
arvidn
ffa870d280
fixed some GCC warnings
2015-08-20 01:33:20 +02:00
Arvid Norberg
68bc4f2cf4
Merge pull request #12 from mlt/wip/i2p
...
Few i2p fixes
2015-08-13 21:55:27 -04:00