0ad/source/network
josue 05afbf1805 Deduplicate the hole punching pacing between client and server
The synchronous client-side SendHolePunchingMessages and the server
worker each implemented the fw_punch config reading, the target
resolution and the message pacing. Move them to a
StunClient::HolePuncher class which sends due messages without
blocking, and express the blocking client-side variant as a loop over
it. The single-message StunClient::SendHolePunchingMessage is no
longer needed.

As a side effect, the client no longer sleeps for fw_punch.delay after
the last message, and skips sending if the server address cannot be
resolved instead of punching an unresolvable address.

Requested by Phosit in the review of #8977.
2026-06-12 18:56:32 +02:00
..
scripting Remove IXmppClient.h 2026-04-14 19:38:05 +02:00
tests Launch session at construction of Net* 2026-04-11 13:46:33 +02:00
FSM.h Fix includes in source/network 2025-07-23 18:18:47 +02:00
HttpServer.cpp Use cpp-httplib instead of mongoose 2026-01-24 10:45:48 +01:00
HttpServer.h Use cpp-httplib instead of mongoose 2026-01-24 10:45:48 +01:00
NetClient.cpp Fix UI when connecting to a server fails 2026-05-17 17:20:37 +02:00
NetClient.h Fix UI when connecting to a server fails 2026-05-17 17:20:37 +02:00
NetClientSession.cpp Use std::unique_ptr for stats-table 2026-04-18 14:38:38 +02:00
NetClientSession.h Use std::unique_ptr for stats-table 2026-04-18 14:38:38 +02:00
NetClientTurnManager.cpp Remove g_GUI usage in simulation2/* 2026-01-23 21:05:18 +01:00
NetClientTurnManager.h Remove g_GUI usage in simulation2/* 2026-01-23 21:05:18 +01:00
NetEnet.cpp Remove custom span and use std::span 2025-08-24 11:09:57 +02:00
NetEnet.h Fix includes in source/network 2025-07-23 18:18:47 +02:00
NetFileTransfer.cpp Do the gamestate compression in the task-manager 2026-04-09 19:03:46 +02:00
NetFileTransfer.h Do the gamestate compression in the task-manager 2026-04-09 19:03:46 +02:00
NetHost.cpp Fix includes in source/network 2025-07-23 18:18:47 +02:00
NetHost.h Use std::unique_ptr for ENetPeer 2026-04-18 14:38:38 +02:00
NetMessage.cpp Fix includes in source/network 2025-07-23 18:18:47 +02:00
NetMessage.h Fix includes in source/network 2025-07-23 18:18:47 +02:00
NetMessages.h Remove ScriptTypes and ScriptExtraHeaders headers 2025-09-14 13:17:18 +02:00
NetMessageSim.cpp Prefer [[maybe_unused]] over UNUSED2 2025-07-28 13:16:37 +02:00
NetProtocol.cpp Fix some includes all over the place 2025-08-13 19:38:21 +02:00
NetProtocol.h Split NetSession into two files 2026-03-11 21:03:52 +01:00
NetServer.cpp Deduplicate the hole punching pacing between client and server 2026-06-12 18:56:32 +02:00
NetServer.h Deduplicate the hole punching pacing between client and server 2026-06-12 18:56:32 +02:00
NetServerSession.cpp Split NetSession into two files 2026-03-11 21:03:52 +01:00
NetServerSession.h Split NetSession into two files 2026-03-11 21:03:52 +01:00
NetServerTurnManager.cpp Split NetSession into two files 2026-03-11 21:03:52 +01:00
NetServerTurnManager.h Fix some includes all over the place 2025-08-13 19:38:21 +02:00
NetStats.cpp Use std::unique_ptr for ENetPeer 2026-04-18 14:38:38 +02:00
NetStats.h Use std::unique_ptr for ENetPeer 2026-04-18 14:38:38 +02:00
NMTCreator.h Prefer [[maybe_unused]] over UNUSED2 2025-07-28 13:16:37 +02:00
Serialization.h Fix includes in source/network 2025-07-23 18:18:47 +02:00
StringConverters.h Fix includes in source/network 2025-07-23 18:18:47 +02:00
StunClient.cpp Deduplicate the hole punching pacing between client and server 2026-06-12 18:56:32 +02:00
StunClient.h Deduplicate the hole punching pacing between client and server 2026-06-12 18:56:32 +02:00