Open ghost opened 7 years ago
Hi,
I'm wondering if your stop/start method is managing object array? If not, which is the best way to achieve a stop all / pause all?
Thanks!
use TorrentPHP\Client\Deluge\ConnectionConfig, TorrentPHP\Client\Deluge\AsyncClientTransport, TorrentPHP\Client\Deluge\AsyncClientFactory, Alert\ReactorFactory; $clientFactory = new TorrentPHP\Client\AsyncClientFactory; $request = new Artax\Request; $config = new ConnectionConfig([ 'host' => 'localhost', 'port' => 8112, 'password' => 'deluge' ]); $transport = new AsyncClientTransport($clientFactory, $request, $config); $pauseAll= function($response) { $adapter->pauseTorrent($response); }; $transport->getTorrents([], $pauseAll);
Hi,
I'm wondering if your stop/start method is managing object array? If not, which is the best way to achieve a stop all / pause all?
Thanks!