Steven Siloti
3564562dab
pass raw buffer in dht_direct_response_alert
2015-08-10 20:33:04 -07:00
Steven Siloti
86fd8c3048
enable arbitrary direct dht requests and extension dht requests
...
If you're wondering why I used an alert for handling responses but not requests,
it's because the former was easy to do that way but the latter would have
involved some major refactoring or kludging. The DHT node is written with the
(IMO reasonable) assumption that all responses will be generated immediately, so
there was no way to easily accommodate getting a response asynchronously via
an alert.
2015-08-10 20:33:04 -07:00
arvidn
a81ca2391b
fix some warnings
2015-08-10 20:03:24 -04:00
arvidn
4fa0aa62da
simulate IP routes, interfaces and page size when building in simulation mode
2015-08-09 15:01:01 -04:00
arvidn
1c1698459c
fix warnings
2015-08-08 22:53:11 -04:00
Arvid Norberg
27c5a28637
Merge pull request #70 from thomas-yuan/master
...
Call callback function immediately when get data for mutable data.
2015-08-08 21:51:18 -04:00
Thomas
e51b61870a
Call callback function immediately when get mutable data.
2015-08-08 20:28:53 -04:00
arvidn
46803b75f8
support building libtorrent in simulation mode (using libsimulator, which is a git submodule)
2015-08-07 21:31:59 -04:00
Alden Torres
eef9f16b3b
Removed unused flag bandwidth-limit-logging and related code.
2015-08-04 01:47:15 -04:00
Steven Siloti
e6b3df3696
pass torrent_handle by const ref in the plugin api
2015-07-25 09:57:55 -07:00
Steven Siloti
423a18ecb1
add missing include
2015-07-25 08:58:32 -07:00
Steven Siloti
e0e06bc87a
switch to peer_connection_handle for optimistic unchoking
...
This is necessary to enable external plugins since the vector is passed to
plugins via on_optimistic_unchoke.
2015-07-23 20:48:35 -07:00
Steven Siloti
2c1f24c036
switch to session_handle in plugin api
2015-07-23 20:13:32 -07:00
Steven Siloti
fbc67b4e21
switch to torrent_handle in plugin api
2015-07-23 19:52:23 -07:00
Mikhail Titov
df21a7e8ce
Use scrape & i2p bitset flags for request
2015-07-14 14:13:10 -05:00
Steven Siloti
9bf1d6c5e9
peer_connection_handle
2015-07-12 14:40:03 -07:00
Alden Torres
a856ae6e9b
Added dht_get_peers and dht_announce at session level.
...
Refactored dht_put_item to dht_put_immutable_item in session_impl since the get operations are not overloaded (consistency).
Added allow_threading_guard to add_dht_node python binding.
Making dht_put_item in session returns a zeroed hash if TORRENT_DISABLE_DHT (avoid unnecessary calculation and it's more consistent).
Added missing DHT operations to the python binding.
Added missing allow_threading_guard to add_dht_node in the python binding.
2015-07-12 10:37:16 -04:00
arvidn
42638c3540
don't ignore errors from setup_listener()
2015-07-11 23:16:37 -04:00
arvidn
2739def57f
minor cleanups. use libtorrent typedefs for asio. failing to bind IPv6 UDP socket is no longer fatal. removed some redundant listen_failed_alerts
2015-07-11 23:01:27 -04:00
arvidn
ed8e4135b2
move include statement to correct place
2015-07-11 22:04:04 -04:00
arvidn
2ab445135a
only retry binding the socket to a new port if the last attempt failed with address-in-use. On other errors, give up immediately
2015-07-11 18:49:53 -04:00
arvidn
a63cfd2a95
improve logging (specifically don't emit bandwidth limiter logs when it's disabled)
2015-07-05 18:44:02 -04:00
Alden Torres
f772675d95
Removed uTP implied port logic from dht_announce.
2015-07-01 15:30:09 -04:00
Alden Torres
fcac7140f8
Added dht_get_peers and dht_announce at session_impl level.
2015-07-01 15:30:08 -04:00
arvidn
94d6e06c97
first step in making opening all the listen sockets a bit more reliable
2015-06-29 23:10:09 -04:00
arvidn
a754559ac6
improve logging aroud binding listen sockets
2015-06-28 09:13:59 -04:00
Mikhail Titov
77ca1ac16f
Quadruple handshake timeout for i2p
2015-06-24 19:40:17 -05:00
arvidn
8b66fbe194
fix bug in previous commit
2015-06-20 18:17:49 -04:00
arvidn
a500ff57be
improve logging of the choker and reliability of the test_auto_unchoke
2015-06-19 01:43:09 -04:00
arvidn
5cb095f6d2
support using 0 disk threads (to perform disk I/O in network thread)
2015-06-14 16:00:04 -04:00
arvidn
aa6598b2e6
don't return an internal session_settings type from the session, return a settings_pack instead
2015-06-07 00:23:30 -04:00
arvidn
9af8841244
remove some unnecessary asio typedefs in the libtorrent namespace, just pull ip::tcp and ip::udp
2015-06-06 13:49:18 -04:00
arvidn
41533205be
drop support for boost 1.35 and fix some more references to the asio namespace
2015-06-06 02:10:53 -04:00
Arvid Norberg
d43f7b56a2
update copyright year
2015-06-03 05:18:48 +00:00
Arvid Norberg
0351326add
separate the main thread and the io_service from session_impl. The io_service object is now simply run() in the main thread, all initialization is done by posting messages to it. This generalizes session_impl to some degree, enables future expansion to run in multiple threads (although, the peers and torrents don't support this). This patch also makes it possible to pass in a third party io_service to the session, but at this point that's mostly useful for tests, as it's not well supported
2015-06-03 03:04:44 +00:00
Arvid Norberg
9b0313bd8e
hold settings_pack by shared_ptr when passing it across thread boundaries. don't allocate it on the heap redundantly
2015-05-29 05:27:53 +00:00
Arvid Norberg
e44c8e9002
optimize logging of DHT packets by deferring copying and printing, to only do it if the alert category is enabled
2015-05-28 20:36:22 +00:00
Arvid Norberg
27cbfa164e
minor cleanup
2015-05-28 14:46:12 +00:00
Arvid Norberg
7f5aff9823
don't trigger recalculating auto-managed unconditionally when adding a new torrent, only in the case where it will most likely be started right away
2015-05-27 20:21:50 +00:00
Arvid Norberg
06bf225237
fix release build and tune want_tick
2015-05-26 20:09:19 +00:00
Arvid Norberg
09bc072c31
inactive/auto managed fixes. fix client_test key input
2015-05-26 18:39:49 +00:00
Arvid Norberg
c6f8dd408a
optimize recalculate auto-managed
2015-05-25 21:46:42 +00:00
Arvid Norberg
0052fa6c19
some cleanup to dht observers (don't expose internals)
2015-05-22 02:42:26 +00:00
Arvid Norberg
0de44067aa
fix warnings
2015-05-19 04:59:31 +00:00
Arvid Norberg
607e708bc4
fix warnings
2015-05-19 03:13:49 +00:00
Arvid Norberg
88fe6eba9c
fix issues introduced in dht logging patch
2015-05-17 20:59:18 +00:00
Arvid Norberg
c871610408
fix bug in DHT logging. clean up some whitespace
2015-05-17 02:00:43 +00:00
Arvid Norberg
58ae099cf8
clean up disk_io_job a bit to avoid old-style casts
2015-05-16 20:41:37 +00:00
Arvid Norberg
99de70604a
remove dht-verbose logging build configuration. tie it to the main logging configuration (which now is on by default) and make it less costly when dht logging alerts are disabled
2015-05-16 19:29:49 +00:00
Arvid Norberg
12c9d3de26
fix more warnings
2015-05-16 18:35:47 +00:00
Arvid Norberg
6a87dc7d84
fix some warnings
2015-05-16 16:24:11 +00:00
Arvid Norberg
2bf4519bee
make the torrent hold a pointer to the ip_filter instead of relying on a session reference
2015-05-16 06:33:37 +00:00
Arvid Norberg
494b425ea1
fix warnings and a peer logging bug
2015-05-10 18:38:10 +00:00
Arvid Norberg
1357fd5265
clean up usage of printf attribute (encapsulate it in a macro)
2015-05-10 05:11:51 +00:00
Arvid Norberg
b60934288b
turn DHT logging into alerts instead of writing to a file
2015-05-10 04:54:02 +00:00
Arvid Norberg
6557910c7f
remove the DHT's last dependency on session_impl
2015-05-09 18:06:02 +00:00
Arvid Norberg
a83dcbaaf0
removed access-log build option and log parser. added incoming_request_alert. This feature can now be implemented by clients
2015-05-09 03:04:08 +00:00
Arvid Norberg
f90537c52d
fix some more coverity issues and add more todo comments
2015-05-05 02:32:14 +00:00
Arvid Norberg
8fdacf9534
address coverity issues and build issue with non atomic 64 bit operations
2015-05-03 22:21:19 +00:00
Arvid Norberg
4f216dece3
factor out strings of peer logs to be enums instead, in peer_log_alert
2015-05-03 02:53:54 +00:00
Arvid Norberg
ab0c97755e
merged fixes from RC_1_0
2015-04-29 05:48:09 +00:00
Arvid Norberg
93a19b44c0
fix another format string issue and add comments to kademlia
2015-04-26 06:25:08 +00:00
Arvid Norberg
2fb1a0f3c7
fix msvc build issue
2015-04-26 01:25:45 +00:00
Arvid Norberg
821e34c795
fix examples build. fix print formatting bugs. fix some gcc warnings
2015-04-25 04:22:51 +00:00
Arvid Norberg
0b063de9ff
fix more warnings
2015-04-21 04:30:34 +00:00
Arvid Norberg
3951377d95
fix include paths for warning push and pop headers
2015-04-21 01:16:28 +00:00
Arvid Norberg
4fd230dbe5
fix build and some warnings
2015-04-20 00:01:27 +00:00
Arvid Norberg
408232cfc8
raise warning level. fix a few of them. filter out warnings from boost
2015-04-18 02:33:39 +00:00
Arvid Norberg
1faf2e201f
inversed TORRENT_LOGGING build config to enable logging by default. It's now disabled by TORRENT_DISABLE_LOGGING
2015-04-17 01:15:33 +00:00
Arvid Norberg
bb48b6e83c
eliminate one more session dependency in peer_connection
2015-04-10 01:50:42 +00:00
Arvid Norberg
6d09050d08
fix build without deprecated functions
2015-04-06 00:06:26 +00:00
Arvid Norberg
b07b208a4a
rate limit how often recalculate_auto_managed can be called (it's expensive)
2015-04-05 19:35:58 +00:00
Arvid Norberg
013ed36f09
landed alert_queue feature branch into trunk
2015-04-03 20:15:48 +00:00
Arvid Norberg
837e709628
deprecate RSS API
2015-03-28 17:31:27 +00:00
Arvid Norberg
ccc7e45406
landed mutable torrents branch in trunk
2015-03-21 00:12:40 +00:00
Arvid Norberg
37225b71ae
const static -> static const (thanks gubatron). helps swigs parser
2015-03-14 00:42:27 +00:00
Arvid Norberg
6c1df7eb55
landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node
2015-03-12 05:20:12 +00:00
Arvid Norberg
c1dc982f4f
deprecate the ptime type and related time types. just use boost::chrono / std::chrono
2015-03-12 04:34:54 +00:00
Arvid Norberg
0c8aee014c
implemented utp extension header to indicate the reason to close the connection
2015-02-28 19:51:15 +00:00
Arvid Norberg
91270a0c2b
make operation_t public and document it. include peer disconnects in client_test log
2015-02-15 05:17:09 +00:00
Arvid Norberg
9b91508c38
clean up session_interface and tracker_manager a bit. work on making tracker_manager more testable
2015-02-01 14:30:43 +00:00
Arvid Norberg
d9e69db0cb
actually make use of the max_failcount setting
2015-01-20 06:26:22 +00:00
Arvid Norberg
54eb499803
make post_torrent_updates more flexible by allowing to pass flags to it. The same flags as torrent_handle::status. Also make the default return accurante progress
2015-01-20 02:46:23 +00:00
Arvid Norberg
431fa2ac55
fix python binding build (and expose the new dht stats alert)
2015-01-18 21:36:24 +00:00
Arvid Norberg
22a02f4a1f
make dht_tracker be held by shared_ptr instead of intrusive_ptr. remove redundant performance counter (total dht sent/received). report DHT IP overhead to the IP overhead counters
2015-01-17 22:06:30 +00:00
Arvid Norberg
58d93e5aa1
add new (non-deprecated) access to dht stats, asynchronously via an alert
2015-01-17 17:02:58 +00:00
Arvid Norberg
b9b657c3d4
post alerts instead of writing to a file, in local peer discovery, when logging is enabled
2015-01-16 23:01:14 +00:00
Arvid Norberg
2943bd4d7d
make test_privacy more reliable
2015-01-14 01:59:23 +00:00
Arvid Norberg
c9075a530d
fix build
2015-01-06 22:17:22 +00:00
Arvid Norberg
1a53a454ec
fix ssl unit test
2015-01-06 08:16:03 +00:00
Arvid Norberg
0f37e3403c
transition from intrusive_ptr to shared_ptr. don't export initialize_default_settings
2015-01-06 08:08:49 +00:00
Arvid Norberg
1b254e16c2
remove comment
2015-01-05 12:25:10 +00:00
Arvid Norberg
bb33b061e4
clean up session_impl
2015-01-04 22:26:26 +00:00
Arvid Norberg
35b41858cf
deprecated session_status and session::status() in favor of performance counters
2015-01-04 21:31:02 +00:00
Arvid Norberg
68ffd3c47c
restore breakage of recalculate_automanaged_torrents, and fix the logic for checking torrents
2015-01-04 21:14:46 +00:00
Arvid Norberg
1218e328cd
SSL fixes (especially over uTP)
2015-01-04 01:04:56 +00:00
Arvid Norberg
764b09d6b5
make the peer fingerprint a regular setting and remove it from the main session constructor argument list
2014-12-31 15:51:45 +00:00
Arvid Norberg
1039d4ae86
tweak some TODO comments and fix one
2014-12-31 14:41:35 +00:00
Arvid Norberg
0977d94dbc
merged changes from RC_1_0
2014-12-25 11:24:02 +00:00
Arvid Norberg
ae04b80fe1
cancel non-critical DNS lookups when shutting down, to cut down on shutdown delay
2014-12-17 02:44:27 +00:00