Moved various socket options to NetworkConfig.

This commit is contained in:
Jari Sundell
2025-09-21 23:01:18 +02:00
committed by GitHub
parent 48f82c17c2
commit 5206e6cb88
2 changed files with 23 additions and 24 deletions
+6 -6
View File
@@ -3,8 +3,8 @@
#include "test/rpc/test_parse_options.h"
#include <array>
#include <torrent/connection_manager.h>
#include <torrent/exceptions.h>
#include <torrent/net/network_config.h>
#include <torrent/utils/log.h>
#include <torrent/utils/option_strings.h>
@@ -178,11 +178,11 @@ TestParseOptions::test_flag_libtorrent() {
void
TestParseOptions::test_flags_libtorrent() {
FLAGS_LT_ENCRYPTION_ASSERT("", torrent::ConnectionManager::encryption_none);
FLAGS_LT_ENCRYPTION_ASSERT("none", torrent::ConnectionManager::encryption_none);
FLAGS_LT_ENCRYPTION_ASSERT("require_rc4", torrent::ConnectionManager::encryption_require_RC4);
FLAGS_LT_ENCRYPTION_ASSERT("require_RC4", torrent::ConnectionManager::encryption_require_RC4);
FLAGS_LT_ENCRYPTION_ASSERT("require_RC4 | enable_retry", torrent::ConnectionManager::encryption_require_RC4 | torrent::ConnectionManager::encryption_enable_retry);
FLAGS_LT_ENCRYPTION_ASSERT("", torrent::net::NetworkConfig::encryption_none);
FLAGS_LT_ENCRYPTION_ASSERT("none", torrent::net::NetworkConfig::encryption_none);
FLAGS_LT_ENCRYPTION_ASSERT("require_rc4", torrent::net::NetworkConfig::encryption_require_RC4);
FLAGS_LT_ENCRYPTION_ASSERT("require_RC4", torrent::net::NetworkConfig::encryption_require_RC4);
FLAGS_LT_ENCRYPTION_ASSERT("require_RC4 | enable_retry", torrent::net::NetworkConfig::encryption_require_RC4 | torrent::net::NetworkConfig::encryption_enable_retry);
FLAGS_LT_ENCRYPTION_ASSERT_ERROR("require_");
}