Traversal: Autoconfigure TTL to use for probe packet

This commit is contained in:
Floogle
2023-01-12 17:45:49 +01:00
parent 4efa10c170
commit 4f11b0d4c9
9 changed files with 268 additions and 33 deletions

View File

@ -1563,14 +1563,16 @@ bool MainWindow::NetPlayHost(const UICommon::GameFile& game)
const std::string traversal_host = Config::Get(Config::NETPLAY_TRAVERSAL_SERVER);
const u16 traversal_port = Config::Get(Config::NETPLAY_TRAVERSAL_PORT);
const u16 traversal_port_alt = Config::Get(Config::NETPLAY_TRAVERSAL_PORT_ALT);
if (is_traversal)
host_port = Config::Get(Config::NETPLAY_LISTEN_PORT);
// Create Server
Settings::Instance().ResetNetPlayServer(new NetPlay::NetPlayServer(
host_port, use_upnp, m_netplay_dialog,
NetPlay::NetTraversalConfig{is_traversal, traversal_host, traversal_port}));
Settings::Instance().ResetNetPlayServer(
new NetPlay::NetPlayServer(host_port, use_upnp, m_netplay_dialog,
NetPlay::NetTraversalConfig{is_traversal, traversal_host,
traversal_port, traversal_port_alt}));
if (!Settings::Instance().GetNetPlayServer()->is_connected)
{