arvidn
9696082355
merged RC_1_1 into master
2018-02-25 09:36:12 +01:00
arvidn
53b4725da3
clean up noexcept specifiers to adapt to what the implementation provides
2018-02-20 08:43:52 +01:00
arvidn
1ede34da8a
undo the patch to restore incoming TCP connections over SOCKS5
2018-02-19 00:01:42 +01:00
Alden Torres
fedee2b5fa
more headers code cleanup and some lint oriented refactor
2018-02-13 00:46:13 +01:00
arvidn
e126d7bce0
move socket_type into aux-namespace
2018-01-29 08:33:45 +01:00
arvidn
a33c81ad33
shave down session_interface by one function, reduce the dependencies between torrent and session
2018-01-29 03:00:59 +01:00
arvidn
308cbfe097
merged RC_1_1 into master
2018-01-27 02:36:55 +01:00
arvidn
bc4d53c71f
restore support for incoming connections over SOCKS5 (disabled by default)
2018-01-25 09:14:14 +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
arvidn
89c6f0b4a8
merged RC_1_1 into master
2018-01-21 15:51:22 +01:00
arvidn
0ee6b7d142
build for iOS on travis
2018-01-18 22:37:37 +01:00
arvidn
65fef972a2
apply some c++11 modernization
2018-01-11 04:51:39 -05:00
arvidn
3a9861e237
complete the error handling test and make it part of the default simulation test suite. It will run a file transfer between two clients repeatedly, each time cause another memory allocation fail, until every single memory allocation has failed once. Any invariant check failure, assertion or signal will cause the test to fail
2018-01-08 04:44:52 -05:00
arvidn
fac9931eb6
fix noexcept marking on entry, and make move assignment
2018-01-04 19:34:42 -05:00
arvidn
5f0c9a0c1d
improve error handling during session shutdown
2017-12-28 13:52:07 +01:00
arvidn
c3bdc6f825
use an intrusive linked list for peer_cache_entry instead an unordered set, to avoid heap allocations and make cache operations not able to fail. This simplifies error handling
2017-12-28 00:52:09 +01:00
arvidn
c1abafc0cc
reserve space in the undead peers list up-front, to not have to allocate memory when disconnecting
2017-12-27 21:24:16 +01:00
arvidn
347555ea8f
handle errors in peer_connection
2017-12-26 10:39:54 +01:00
arvidn
56ca5fa63c
support asio handler allocators in deferred_handler
2017-12-26 09:44:51 +01:00
arvidn
40292a1d51
don't heap-allocate handlers for incoming UDP packets
2017-12-24 11:22:30 +01:00
arvidn
62bf524e75
disable DHT logging with the TORRENT_DISABLE_LOGGING macros as well
2017-12-23 12:01:18 +01:00
arvidn
a54f76d5df
deprecate status_code from tracker_error_alert (it's already part of the error_code), simplify code a bit
2017-12-19 00:55:51 +01:00
Alden Torres
db61d9cc20
minor cleanup, refactor and typos ( #2593 )
2017-12-07 07:51:55 +01:00
arvidn
c16eb32b94
merge RC_1_1 into master
2017-12-03 18:12:35 +01:00
arvidn
4b467f82ac
fix issue with initializing settings on session construction
2017-12-02 12:20:36 +01:00
arvidn
a6656aeb93
generate random keys for use in tracker announces. keys are unique for each torrent and the listen interface they announce via
2017-11-29 00:10:35 +01:00
arvidn
5e7666526e
fix IPv6 tracker announce issue
2017-11-23 10:11:59 +01:00
Arvid Norberg
c734f42ac3
make tracker announces happen even if there are no open listen sockets ( #2529 )
...
support announcing to IPv6 trackers and running an IPv6 DHT when not listening for incoming connections
2017-11-20 23:42:22 +01:00
arvidn
237856f7f1
more fixes of unwanted macro expansions of min/max in headers (windows.h compatibility)
2017-11-13 15:36:42 +01:00
arvidn
0378ae47f4
fix some macro expansions of 'max' in headers, to improve compatibility with windows.h
2017-11-12 23:01:47 +01:00
arvidn
b6a73eeaaa
simplify trigger_unchoke and trigger_optimistic_unchoke on session_impl, abd make them noexcept
2017-11-12 15:48:46 +01:00
arvidn
254f813626
factor out handler allocator and reuse it for posting deferred peer removals on torrents
2017-11-11 10:41:39 +01:00
arvidn
fc74c032f0
minor cleanup and modernization of torrent_peer
2017-11-09 15:48:27 +01:00
arvidn
6785046c2f
introduce a download_priority_t type, for uniform an type-safe piece- and file priorities
2017-11-02 08:20:21 +01:00
arvidn
f57b90b500
introduce type for torrent queue_position
2017-11-01 10:52:45 +01:00
Alden Torres
5480c08184
enable/disable the internal ip notifier with new setting ( #2487 )
2017-11-01 10:51:51 +01:00
Alden Torres
f040d6d860
added reopen_network_sockets method to allow manual reopen of listen/outgoing sockets ( #2476 )
2017-10-28 12:15:35 +02:00
arvidn
9e69bf3618
introduce a type to refer to a torrent-list-index, to improve type safety
2017-10-25 13:39:37 +02:00
Alden Torres
6409cb42e1
fix implicit-fallthrough warnings with gcc 7
2017-10-23 19:18:33 +02:00
Alden Torres
bb409c5ee9
missing return if error in session_impl::on_port_mapping, doc typo ( #2459 )
2017-10-23 12:36:51 +02:00
Alden Torres
762ae9aec4
pick standard std::aligned_union if using clang ( #2447 )
2017-10-15 04:29:33 +02:00
arvidn
9111d5977e
make the variables holding the source of external IPs type-safe
2017-10-10 22:38:36 +02:00
Arvid Norberg
60b74d2616
merged RC_1_1 into master
2017-10-10 14:25:12 +02:00
Arvid Norberg
830ef0bedd
prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl
2017-10-09 17:15:35 +02:00
arvidn
1d15e6bfb4
merge RC_1_1 into master
2017-10-08 18:21:25 +02:00
arvidn
cdd9f91999
fix leak of torrent_peer objecs (entries in peer_list)
2017-10-07 11:43:42 +02:00
arvidn
c66f4cc62a
fix some warnings, mostly 0 -> nullptr
2017-09-28 07:33:10 -07:00
arvidn
edad33d270
fix const correctness in get_peer_class
2017-09-24 14:49:55 -07:00
Steven Siloti
8648de3706
DHT nodes should only handle requests on their socket ( #2355 )
2017-09-21 21:00:38 -07:00
arvidn
93bb84d94c
some random cleanup
2017-09-13 08:28:46 +02:00
arvidn
735f6fd1f4
remove redundant virtual specificers when override is present
2017-09-10 19:28:18 +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
bb51dcdbb9
move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace
2017-09-04 22:38:16 +02:00
arvidn
11f008e90e
use a strong typedef for port mapping id
2017-09-02 07:02:07 +02:00
Arvid Norberg
f734ad067b
straighten out some type-safety in port mapping enums ( #2285 )
2017-08-30 20:47:49 +02:00
Arvid Norberg
1075ae3b8d
remove session pool allocator and use the buffer class instead ( #2274 )
...
simplify append_buffer by using size() to determine size of the buffer. make the move explicit in chained_buffer::init_buffer_entry
2017-08-28 11:37:53 +02:00
Arvid Norberg
d250ba5a17
wrap destination string in i2p_peer in string_ptr handler ( #2268 )
2017-08-25 09:42:46 +02:00
arvidn
e92cbf502c
remove the last use of session_impl get_ipv6_interface and get_ipv4_interface
2017-08-23 21:01:15 +02:00
arvidn
f311bf354e
remove left-overs from disk buffer pool allocator
2017-08-21 16:36:00 +02:00
arvidn
6b1037eff5
convert enum values that are just used as constants, to actual constants with the correct type
2017-08-04 15:23:20 +02:00
arvidn
6fa181ece8
some cleanup of type-safe flags
2017-07-30 18:20:15 -07:00
arvidn
322007bb6a
make save_state_flags a strong type
2017-07-30 09:06:41 -07:00
arvidn
24e4263bae
make torrent status flags be type safe
2017-07-27 09:33:35 -07:00
arvidn
8d0f38930e
make udp send flags type safe
2017-07-26 18:09:17 -07:00
arvidn
83ca755d1b
simplify setup_listener
2017-07-26 12:02:58 -07:00
arvidn
cd343c91bc
make base32encode flags type safe
2017-07-26 10:38:14 -07:00
Steven Siloti
5eba09fce7
changes based on review feedback
2017-07-21 19:18:44 -07:00
Steven Siloti
1a64490ef0
fix
2017-07-21 19:18:44 -07:00
Steven Siloti
f0ae2145ea
use a handle class for listen sockets instead of raw pointers
...
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.
To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Steven Siloti
e0dcd34352
convert m_listen_sockets to a vector of shared_ptr
2017-07-21 19:18:43 -07:00
Steven Siloti
0f30815d8f
Revert "don't move listen_socket_t when deleting sockets"
...
This reverts commit 718c5f0dcb
.
2017-07-21 19:18:43 -07:00
Steven Siloti
2e79c5e648
fix handling of SSL listen sockets
2017-07-10 21:41:39 -07:00
Steven Siloti
389b4eb3f2
make listen_socket_t non-copyable and non-movable ( #2137 )
...
The DHT stores a pointer to this struct so it must not be copied or moved once
it is stored in m_listen_sockets.
2017-07-10 10:14:36 -07:00
Steven Siloti
718c5f0dcb
don't move listen_socket_t when deleting sockets
...
Pointers to listen_socket_t are stored in dht_tracker, so they
cannot be copied or moved once they are added to m_listen_sockets.
listen_socket_t should really be made non-copyable and non-moveable, but the
socket creation path needs to be refactored before that can be done.
2017-07-08 08:42:04 -07:00
arvidn
5c37eb174f
drop support for windows compilers without std::string and wchar_t (believed to be old cygwin)
2017-07-02 08:24:55 -04:00
arvidn
ed79929528
factor out has_any_file to storage_utils
2017-06-23 16:33:48 -04:00
arvidn
b7642f75d5
move clear_bufs out of storage.cpp into storage_utils
2017-06-21 13:04:05 -04:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
arvidn
700befc98a
fix for what appears to be an clang/llvm miscompilation
2017-06-07 22:35:35 +02:00
arvidn
5e384ccce3
more typed_span conversion fixes
2017-06-02 17:32:27 +02:00
Alden Torres
b1b3f0e3e8
one more fix related to typed_span conversion ( #2050 )
2017-06-02 06:42:03 +02:00
arvidn
6967d17a42
make move constructors and move assignment operators noexcept
2017-06-01 23:42:15 +02:00
Arvid Norberg
5344761da4
make flags to move_storage a proper enum class ( #2043 )
2017-06-01 04:15:15 -04:00
Alden Torres
c5cdd381da
fixed compilation warnings with newer versions of clang ( #2047 )
2017-06-01 04:12:02 -04:00
arvidn
77dcc5363f
fix build with exceptions disabled
2017-05-28 06:42:49 -04:00
Steven Siloti
353ab20280
make session_handle hold a weak_ptr and be copyable ( #2034 )
2017-05-28 06:41:50 -04:00
Pavel Pimenov
4cee8104d7
add base_mapping_t ( #2025 )
...
factor out parts of mapping struct from NATPMP and UPnP
2017-05-27 20:26:47 -04:00
Alden Torres
fd51c0b8bf
minor refactor in file_storeage and typos
2017-05-02 22:34:11 -04:00
arvidn
af495da56b
use std::function instead of the fileop interface for readwritev()
2017-05-02 08:07:29 -04:00
Arvid Norberg
1af17be046
use enum class for ssl bool in listen socket ( #1960 )
...
use enum class for ssl bool in listen socket. use std::array instead of C array. make test_listen_socket a bit more compact
2017-04-30 21:11:42 -04:00
arvidn
749d0da875
make iovec_t an alias for span<char>, in preparation for removing it altogether in favour of span
2017-04-30 11:49:08 -04:00
Steven Siloti
540e1046e7
remove deprecated udp functions
2017-04-30 08:11:56 -04:00
Steven Siloti
fd50630020
announce to trackers for all listen interfaces
2017-04-30 08:11:56 -04:00
arvidn
23ba9d12d1
construct and destruct objects in stack allocations (alloca())
2017-04-28 21:34:31 -04:00
Steven Siloti
761436dc97
add support for utp over multiple interfaces ( #1944 )
2017-04-25 23:00:41 -04:00
Steven Siloti
cdd50be859
create a separate DHT node for each listen socket
2017-04-23 19:49:49 -04:00
arvidn
df299fcb00
use boost::variant for disk_io_job in/out parameter, to support holding a proper disk io buffer handle and string
2017-04-17 15:08:27 -04:00
arvidn
91838d8a65
clean up declaration for removed function
2017-04-12 21:00:41 -07:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00