Commit Graph

569 Commits

Author SHA1 Message Date
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 fc74c032f0 minor cleanup and modernization of torrent_peer 2017-11-09 15:48:27 +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 bb409c5ee9 missing return if error in session_impl::on_port_mapping, doc typo (#2459) 2017-10-23 12:36:51 +02:00
arvidn 9111d5977e make the variables holding the source of external IPs type-safe 2017-10-10 22:38:36 +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 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
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 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
Steven Siloti 5eba09fce7 changes based on review feedback 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
Alden Torres 48ef3b6bf7 implemented support for BEP 51 (#1652) 2017-06-12 11:54:11 +02:00
Steven Siloti 353ab20280 make session_handle hold a weak_ptr and be copyable (#2034) 2017-05-28 06:41:50 -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
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
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 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
Arvid Norberg 13b16a63a3 use unsigned type for file flags. make file_pool private to disk_io_thread (#1894)
use unsigned type for file flags. make file_pool private to disk_io_thread. move close_file_interval logic to the disk thread. don't expose file in public interface, and make pool_file_status properly public (not part of file_pool and renamed to open_file_status), this is exposed in public interface via torrent_handle::file_status()
2017-04-08 18:24:50 -04:00
Alden Torres cec874591d moved ip_notifier.hpp to aux_ 2017-04-05 20:37:32 -04:00
Alden Torres 65cf7af722 using unique_ptr for m_ip_notifier in session_impl 2017-04-05 17:43:12 -04:00
arvidn 9e5822dfba remove unused m_tick_residual accounting 2017-04-05 01:35:39 -04:00
Alden Torres 45bea967c2 added resolver_cache_timeout setting (#1878)
added resolver_cache_timeout setting
2017-04-04 18:23:37 -04:00
pavel.pimenov 6afb0fd51b fix m_host_resolver (for RC_1_1) 2017-03-31 07:29:03 -04:00
Alden Torres 990756ca38 code cleanup related to async_resolve (#1873) 2017-03-30 23:00:59 -04:00
arvidn d720b282b8 Merge branch 'master' of https://github.com/arvidn/libtorrent 2017-03-30 18:14:09 -04:00