Shrek
Shrek

Reputation: 347

Libtorrent settings enum

In Libtorrent sessions there is a few enurm, I'm a bit stuck on how to set the enurm for instance in the following:

   struct session_settings
    {
       enum suggest_mode_t
       {
          no_piece_suggestions,
          suggest_read_cache,
       };
    }

no_piece_suggestions is 0 and suggest_read_cache is 1 with no_piece_suggestions being the default so how would I make suggest_read_cache the default?

Upvotes: 0

Views: 136

Answers (1)

Arvid
Arvid

Reputation: 11245

The default just means what the setting will be if you don't set it.

If you want to change the default, you change the libtorrent source file src/session.cpp (where the session_settings constructor is defined).

If you just want to change the settings for your session object, construct a session_settings object, set session_settings::suggest_mode to session_settings::suggest_read_cache then call session::set_settings() with your settings object.

Upvotes: 2

Related Questions