arvidn
35ec87af4f
add stats counter for the number of outstanding async_accept calls
2018-11-30 02:15:45 +01:00
Steven Siloti
cc49a7fb15
fix assertion when sending a udp packet to a closed socket
...
This can happen particularly during shutdown. We should eventually get to a
point where this doesn't happen, but since we close the sockets immediately
upon initiating shutdown it's hard to avoid for now.
2018-11-30 02:15:22 +01:00
arvidn
1b2832e018
convert some for-loops into std algorithms
2018-11-27 19:43:01 +01:00
arvidn
5383854768
make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts
2018-11-16 14:06:22 +01:00
arvidn
5929ad4cae
merge RC_1_1 into master (again)
2018-11-15 22:55:52 +01:00
arvidn
29cddaa23e
merged RC_1_1 into master
2018-11-15 15:19:24 +01:00
arvidn
6d886f29a9
support moving the whole add_torrent_params object into the add_torrent call on session
2018-11-14 19:11:11 +01:00
arvidn
0c76a3a0c5
require tracker_request objects be moved into queue_manager. also replace non-const reference parameter with rvalue reference
2018-11-14 17:09:04 +01:00
arvidn
13dd7cfe1e
a better fix to the ssl port announce bug
2018-11-14 07:36:22 +01:00
arvidn
4d88c83576
add rvalue reference overloads for add_torrent_params, settings_pack and session_params. Those structures are pretty large so being able to take them by rvalue reference may be beneficial
2018-11-13 08:05:56 +01:00
arvidn
d0e146eb75
merged RC_1_1 into master
2018-11-01 09:48:41 +01:00
Arvid Norberg
e1eb12e60f
ssl listen port fix and improved tracker announce logging
2018-10-29 18:38:14 +01:00
pavel.pimenov
b00ce69d58
remove params.url.clear();
2018-10-25 09:49:38 +02:00
arvidn
3fb05d77d8
fix warnings
2018-10-20 20:56:26 +02:00
Arvid Norberg
d2f19a2d73
merged RC_1_1 into master
2018-10-01 16:34:21 +02:00
Arvid Norberg
81356cfce1
add make_tcp() and make_udp() to convert endpoint types
2018-09-19 10:57:28 -07:00
arvidn
c9043dec53
force proxy no longer disables the DHT
2018-08-20 08:24:31 +02:00
Alden Torres
28c94b54ed
minor code refactor for more use of const and emplace
2018-08-20 08:06:37 +02:00
Arvid Norberg
b90564d418
remove the IPv6 enable/disable build config
2018-08-19 22:20:54 +02:00
Arvid Norberg
fef1b947f3
fix issue in self-connection detection introduced with the change to generate unique peer-ids for each connection. Now, the torrent keeps track of all of our peer-ids generated for outgoing (bittorrent) connections, and we check them against incoming peers' peer-ids
2018-08-19 22:19:53 +02:00
arvidn
b3dbce5790
merge RC_1_1 into master
2018-08-13 09:32:17 +02:00
arvidn
6d2541f131
improve connect-boost feature, to make new torrents quickly connect peers
2018-08-09 20:12:56 +02:00
arvidn
7be9547817
add a few more stats counters measuring outgoing connection attempts. simplify session_stats_header_alert by posting it on first call to post_session_stats() instead of making it gated by the alert_mask
2018-08-09 20:10:35 +02:00
Steven Siloti
92f1937b97
fix typo in #if tests for TORRENT_DISABLE_ENCRYPTION
2018-07-29 09:04:16 +02:00
Arvid Norberg
b3856d3027
narrow the scope affected by TORRENT_DISABLE_EXTENSIONS to only disable the user extensions, but always support the extension message and the built-in extensions, like lt_donthave and seed_mode
2018-07-26 09:31:49 +02:00
Arvid Norberg
4282dd072a
factor out generate_peer_id into its own file
2018-07-25 08:49:18 +02:00
arvidn
730ef15b08
minor cleanups
2018-07-24 16:34:46 +02:00
Arvid Norberg
dcb8b816a3
only post alerts for newly opened listen sockets, and only attempt to map ports for newly opened sockets. track has_incoming_connections per listen socket
2018-07-23 15:04:23 +02:00
arvidn
f4b0dbf115
merged RC_1_1 into master
2018-07-20 09:28:21 +02:00
arvidn
1ebc5f9ef2
remove special handling of uTP peers
2018-07-20 07:47:08 +02:00
Alden Torres
d9d387d711
minor code cleanup, more use of const ( #3174 )
...
* minor code cleanup, more use of const, using u literal per lint
* revert use of unsigned literal
* reverted loop change
2018-07-16 18:23:38 +02:00
arvidn
4aa3c4573a
use the strong type for pause flags
2018-07-16 12:06:21 +02:00
arvidn
4633258fbe
make the DHT announce flags a strong type
2018-07-16 12:04:16 +02:00
Steven Siloti
e5be30157f
set port in handshake based on source address ( #3172 )
2018-07-15 21:15:04 +02:00
Steven Siloti
961cf62cad
dht: announce with per-interface listen port
2018-07-12 08:36:57 +02:00
arvidn
b750b6cc2c
deprecate (and disable) the force-proxy setting. Instead, always use the proxy when set, never fall back on circumventing it
2018-07-08 18:26:47 +02:00
Alden Torres
2c5da2778a
more lint oriented code refactor/cleanup
2018-06-29 13:27:29 +02:00
Steven Siloti
fbaa1afd62
return a vector of mapping ids from add_port_mapping
2018-06-07 18:18:31 -07:00
Steven Siloti
f6720e31ed
don't re-map all listen sockets when changing listen_interfaces
...
New sockets will be mapped regardless of the remap parameter. Requesting
full re-mapping just creates unecessary network traffic.
2018-06-07 18:16:08 -07:00
Steven Siloti
78be52112f
create a natpmp instance for each listen socket
2018-06-07 18:16:08 -07:00
Alden Torres
6c4869f044
moved instantiate_connection to aux namespace
2018-05-29 09:25:25 +02:00
arvidn
534276e7a5
refactor to use the utility function for bind_socket_to_device() instead of using the bind_to_device socket option directly, to make it best effort. include operation enum in udp_error alert.
2018-05-23 12:11:04 +02:00
Steven Siloti
92a7188163
only start a new accept request on new listen sockets
...
Existing sockets already have an outstanding accept.
Also fix mapping new listen sockets when re-mapping is not requested.
2018-05-22 11:06:33 +02:00
Arvid Norberg
17055ad4d1
don't enable reuse-address for UDP sockets, as it will always succeed and not get any incoming packets. It's better to detect a port conflict and try a different port. Also implement port-retry logic for the UDP sockets
2018-05-13 22:36:02 +02:00
arvidn
fe612ca167
replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options
2018-05-13 19:25:17 +02:00
arvidn
9ca12d6db5
restore aspects of the previous behavior of force-proxy. Instead of not opening any TCP listen sockets at all, open them but reject any incoming connection. This is because in RC_1_1, the UDP and TCP sockets are tied in subtle and unintuitive ways. This is much cleaner in the next major release and this patch will not need to be merged
2018-05-13 12:31:00 +02:00
arvidn
ddd1168296
don't attempt to make uTP connections if we don't have any outgoing UDP sockets
2018-05-12 13:34:58 +02:00
arvidn
4d17e0132e
fix empty outgoing interfaces for UDP sockets
2018-05-12 13:34:58 +02:00
arvidn
8621477239
merged RC_1_1 into master
2018-04-28 14:36:24 +02:00
Xiyue Deng
21d8e9e26b
Add missing header <cstdarg> for va_list.
...
* Fix building on OpenBSD.
2018-04-24 23:09:25 -04:00