[api] Extract cold code from APIServer::loop() hot path (#13902)

This commit is contained in:
J. Nick Koston
2026-02-12 11:04:23 -06:00
committed by GitHub
parent 60fef5e656
commit 0e1433329d
2 changed files with 74 additions and 61 deletions
+5
View File
@@ -234,6 +234,11 @@ class APIServer : public Component,
#endif
protected:
// Accept incoming socket connections. Only called when socket has pending connections.
void __attribute__((noinline)) accept_new_connections_();
// Remove a disconnected client by index. Swaps with last element and pops.
void __attribute__((noinline)) remove_client_(size_t client_index);
#ifdef USE_API_NOISE
bool update_noise_psk_(const SavedNoisePsk &new_psk, const LogString *save_log_msg, const LogString *fail_log_msg,
const psk_t &active_psk, bool make_active);