Inline nlohmann/json for the JSON parsing itself, and handle requests
with the same SCGI interface as XML-RPC.
Based off the work in https://github.com/jesec/rtorrent
This commit replaces the `rak/functional.h` features with lambdas and std functions.
There was one instance with `std::sort` where the comparison operator was always evaluating to false and it wasn't sorting anything. This is removed in favour of the default comparison operator.
`std::sort(transferChunks.begin(), transferChunks.end());`
* Added 'd.timestamp.finished' that is set when a downloading torrent completes. For torrents that only seed it remains '0'.
* Added 'elapsed.{less,greater}' for checking the time elapsed since a time is less/greater, and it also returns false in all cases where the time is '0'.
* Fixed a bug that would cause hash checking to block exessively in some cases.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1233 e378c898-3ddf-0310-93e7-cc216c733640
print = (convert.time,(system.time))
schedule2 = test_print_2,2,2,((print,"current ",((convert.time,((system.time))))))
Multiple parantheses need to be used in schedule to ensure the command doesn't get evaluated at the time of calling schedule.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1191 e378c898-3ddf-0310-93e7-cc216c733640
* Fixes a crash when parsing a malformed get_peers (or find_node) response throws an exception and fails to remove the corresponding transaction. Ticket #1622.
* Fix automatic unchoking of new peers exceeding the max upload slots of the download.
* Stops rtorrent from always creating and resizing ALL files, even those set to "off". Files will still be created, but with a size of zero, until a part of them is getting downloaded. This helps with filesystems that don't support sparse files (such as FAT, HFS+, and others).
* Fix inefficient piece distribution due to linear chunk request strategy by randomizing position every few (on average 32) chunks, see ticket #190.
* Fixes lack of return values for user-defined commands (using system.method.insert). When there are multiple commands, returns the result of the last one.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1089 e378c898-3ddf-0310-93e7-cc216c733640
* Changed more key bindings in ElementDownloadList to commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1038 e378c898-3ddf-0310-93e7-cc216c733640
* Allow commands to be appended to "{stop,close}_on_ratio".
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@976 e378c898-3ddf-0310-93e7-cc216c733640
newline. Patch by Jussi Judin under Public Domain.
* Added warnings on usage of scgi_port.
* Include a file's completed chunks count in the resume data.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@973 e378c898-3ddf-0310-93e7-cc216c733640
to 'd.multicall'.
* Cleanup of 'rpc/parse_commands.h'.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@961 e378c898-3ddf-0310-93e7-cc216c733640
* Added 'call_command' that takes a view as the first parameter and
then a list of commands. It will return a list of lists containing the
results from those commands.
* Fixed the xmlrpc-c-config usage.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@954 e378c898-3ddf-0310-93e7-cc216c733640
* Allow lists as arguments in commands by using '{' and '}'. The list
will be recursed and all '$' will be called, while '~' will only be
expanded when in the first element in the list. E.g "execute =
touch,{~/tmp/,$get_client_version=}"
* Added rak::path_expand that works on char buffers.
* Fixed RequestList::calculate_pipe_size so it doesn't request too
many pieces from fast peers.
* Added 'execute_log' for logging the result of calls to 'execute'.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@952 e378c898-3ddf-0310-93e7-cc216c733640
the string parser, so it must be preceeded by whitespace.
* Allow escaping of newlines in the resource file.
* Cleanup of the parse_command_* commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@936 e378c898-3ddf-0310-93e7-cc216c733640
* Commands that pass through rpc::parse_command_* now support inline
commands that start with a '$'. E.g 'print="$get_ip="'.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@933 e378c898-3ddf-0310-93e7-cc216c733640