INNER CODE UNIT · JavaScript
JSONRPCClient
sonnyp/aria2.js · src/JSONRPCClient.js:29
class JSONRPCClient extends EventTarget {
constructor(options) {
super();
this.deferreds = Object.create(null);
this.lastId = 0;
Object.assign(this, this.constructor.defaultOptions, options);
}
id() {
return this.lastId++;
}
url(protocol) {
return (
protocol +
(this.secure ? "s" : "") +
"://" +