libtorrent todo-list

relevance 3src/alert.cpp:370change this to use a timed wait on a condition variable problem is, that's not necessarily portable. But it should be used where available. This implementation can be left the way it is for more primitive platforms
relevance 3src/storage.cpp:989use binary search to find the file entry
relevance 3src/storage.cpp:1095use binary search to find the file entry
relevance 3src/utp_stream.cpp:412remove the read timeout concept. This should not be necessary
relevance 3src/utp_stream.cpp:415remove the write timeout concept. This should not be necessary
relevance 3src/kademlia/rpc_manager.cpp:36remove this dependency by having the dht observer have its own flags
relevance 3include/libtorrent/kademlia/find_data.hpp:60rename this class to find_peers, since that's what it does find_data is an unnecessarily generic name
relevance 2src/torrent.cpp:5790pass in ec along with the alert
relevance 2src/utp_stream.cpp:617support the option to turn it off
relevance 2include/libtorrent/torrent.hpp:1038this should be a deque, since time critical pieces are expected to be popped in the same order as they are sorted. The expectation is that new items are pushed back and items are popped from the front
relevance 2include/libtorrent/kademlia/node_entry.hpp:92replace with a union of address_v4 and address_v6 to not waste space. This struct is instantiated hundreds of times for the routing table
relevance 1src/http_seed_connection.cpp:120in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size
relevance 1src/peer_connection.cpp:2488peers should really be corked/uncorked outside of all completed disk operations
relevance 1src/session_impl.cpp:6135we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily
relevance 1src/torrent.cpp:5294save the send_stats state instead of throwing them away it may pose an issue when downgrading though
relevance 0src/bt_peer_connection.cpp:660this could be optimized using knuth morris pratt
relevance 0src/bt_peer_connection.cpp:1755don't trust this blindly
relevance 0src/bt_peer_connection.cpp:2069if we're finished, send upload_only message
relevance 0src/bt_peer_connection.cpp:3308move the erasing into the loop above remove all payload ranges that has been sent
relevance 0src/file.cpp:1205is there any way to pre-fetch data from a file on windows?
relevance 0src/http_tracker_connection.cpp:99support authentication (i.e. user name and password) in the URL
relevance 0src/i2p_stream.cpp:172move this to proxy_base and use it in all proxies
relevance 0src/packet_buffer.cpp:176use compare_less_wrap for this comparison as well
relevance 0src/peer_connection.cpp:2651this might need something more so that once we have the metadata we can construct a full bitfield
relevance 0src/peer_connection.cpp:2782sort the allowed fast set in priority order
relevance 0src/peer_connection.cpp:3892we should probably just send a HAVE_ALL here
relevance 0src/peer_connection.cpp:4475peers should really be corked/uncorked outside of all completed disk operations
relevance 0src/policy.cpp:857only allow _one_ connection to use this override at a time
relevance 0src/policy.cpp:1889how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy
relevance 0src/session_impl.cpp:1887recalculate all connect candidates for all torrents
relevance 0src/session_impl.cpp:4267allow extensions to sort torrents for queuing
relevance 0src/session_impl.cpp:4423use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections
relevance 0src/session_impl.cpp:4457make this bias configurable
relevance 0src/session_impl.cpp:4458also take average_peers into account, to create a bias for downloading torrents with < average peers
relevance 0src/session_impl.cpp:4602make configurable
relevance 0src/session_impl.cpp:4616make configurable
relevance 0src/session_impl.cpp:5113find by url?
relevance 0src/session_impl.cpp:5469report the proper address of the router
relevance 0src/session_impl.cpp:5673report errors as alerts
relevance 0src/storage.cpp:325if the read fails, set error and exit immediately
relevance 0src/storage.cpp:358if the read fails, set error and exit immediately
relevance 0src/storage.cpp:623make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info
relevance 0src/storage.cpp:1208what if file_base is used to merge several virtual files into a single physical file? We should probably disable this if file_base is used. This is not a widely used feature though
relevance 0src/torrent.cpp:1112make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file
relevance 0src/torrent.cpp:1505filter out peers that are disconnecting
relevance 0src/torrent.cpp:2289this pattern is repeated in a few places. Factor this into a function and generalize the concept of a torrent having a dedicated listen port
relevance 0src/torrent.cpp:5028make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync
relevance 0src/torrent.cpp:5164if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces
relevance 0src/torrent.cpp:5351make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance
relevance 0src/torrent.cpp:5928ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.
relevance 0src/torrent.cpp:6005if peer is a really good peer, maybe we shouldn't disconnect it
relevance 0src/torrent.cpp:6180should disconnect all peers that have the pieces we have not just seeds
relevance 0src/torrent.cpp:7820go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece
relevance 0src/torrent.cpp:8047if there's been long enough since we requested something from this piece, request one of the backup blocks (the one with the least number of requests to it) and update the last request timestamp
relevance 0src/torrent.cpp:8718with some response codes, we should just consider the tracker as a failure and not retry it anymore
relevance 0src/torrent_info.cpp:187should this take a char const*?
relevance 0src/torrent_info.cpp:366this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!
relevance 0src/torrent_info.cpp:387once the filename renaming is removed from here this check can be removed as well
relevance 0src/udp_tracker_connection.cpp:548it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers
relevance 0src/utp_stream.cpp:1846we might want to do something else here as well, to resend the packet immediately without it being an MTU probe
relevance 0src/kademlia/dht_tracker.cpp:641fix this stats logging ++m_replies_sent[e["r"]]; m_replies_bytes_sent[e["r"]] += int(m_send_buf.size());
relevance 0src/kademlia/node.cpp:63configurable?
relevance 0src/kademlia/node.cpp:690find_node should write directly to the response entry
relevance 0src/kademlia/rpc_manager.cpp:439don't call short_timeout() again if we've already called it once
relevance 0include/libtorrent/config.hpp:283Make this count Unicode characters instead of bytes on windows
relevance 0include/libtorrent/ip_voter.hpp:100instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.
relevance 0include/libtorrent/proxy_base.hpp:152it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);
relevance 0include/libtorrent/torrent_info.hpp:448these strings could be lazy_entry* to save memory
relevance 0include/libtorrent/udp_socket.hpp:195move this debug facility into a base class. It's used in a lot of places
relevance 0include/libtorrent/utp_stream.hpp:350implement
relevance 0include/libtorrent/web_peer_connection.hpp:127if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer
relevance 0include/libtorrent/kademlia/dht_tracker.hpp:79take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core