k">
struct torrent_plugin
{
   virtual std::shared_ptr&lt;peer_plugin&gt; <strong>new_connection</strong> (peer_connection_handle const&amp;);
   virtual void <strong>on_piece_failed</strong> (piece_index_t);
   virtual void <strong>on_piece_pass</strong> (piece_index_t);
   virtual void <strong>tick</strong> ();
   virtual bool <strong>on_pause</strong> ();
   virtual bool <strong>on_resume</strong> ();
   virtual void <strong>on_files_checked</strong> ();
   virtual void <strong>on_state</strong> (torrent