J. Nick Koston
5bee336a76
Single enqueue_or_fail_ tail call in write_raw_
2026-03-16 12:31:36 -10:00
J. Nick Koston
1a3c477998
Single enqueue_or_fail_ tail call in write_raw_
2026-03-16 12:30:47 -10:00
J. Nick Koston
e8bf69d1e2
Restructure write_raw_ for single enqueue_or_fail_ tail call
2026-03-16 12:29:39 -10:00
J. Nick Koston
2893788d4b
Remove dead iovcnt==0 check — no caller passes 0
2026-03-16 12:28:37 -10:00
J. Nick Koston
7846c42730
Rename base loop() to try_drain_overflow_buffer_() inline helper
...
The base class loop() only drained the overflow buffer. Rename to
make intent clear and inline it so the compiler can optimize across
the call boundary. Make loop() pure virtual since subclasses always
override it.
2026-03-16 12:17:15 -10:00
J. Nick Koston
8a8e05fdb2
Remove remaining sav_errno locals
2026-03-16 12:11:34 -10:00
J. Nick Koston
488c395fbb
Simplify: no need to save errno before HELPER_LOG
2026-03-16 12:10:52 -10:00
J. Nick Koston
6e80814507
Propagate drain errors in write_raw_ to preserve original behavior
2026-03-16 12:09:22 -10:00
J. Nick Koston
0eed9e8eb6
[api] Extract overflow buffer from frame helper into APIOverflowBuffer
...
The TCP send overflow buffer code was embedded directly in
APIFrameHelper, making it appear to be part of the primary send path.
In reality, it is rarely used in production — only when the kernel TCP
send buffer is full due to a slow client, congested network, or heavy
logging. Extract it into a dedicated APIOverflowBuffer class with clear
documentation about its purpose and usage frequency.
2026-03-16 12:00:20 -10:00
J. Nick Koston and Claude Opus 4.6
db405c483e
[core] Cache errno to avoid duplicate __errno() calls ( #14751 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-16 07:35:34 -10:00
J. Nick Koston
2585779f11
[api] Remove duplicate peername storage to save RAM ( #13540 )
2026-02-11 07:23:16 +13:00
J. Nick Koston and Keith Burzinski
2147ddf8c7
[api] Eliminate std::string from ClientInfo struct ( #12566 )
...
Co-authored-by: Keith Burzinski <kbx81x@gmail.com >
2026-01-06 21:32:23 +00:00
J. Nick Koston
1240e7907e
[api] Use stack-based format_hex_pretty_to for packet logging macros ( #12788 )
2026-01-02 16:35:44 -10:00
J. Nick Koston
19439199cc
[api] Add configurable send queue limit to prevent OOM crashes ( #10973 )
2025-10-06 09:25:04 +13:00
J. Nick Koston
f2aa5a754c
[api] Remove ClientInfo::get_combined_info() to eliminate heap fragmentation ( #10970 )
2025-10-02 12:44:30 +13:00
J. Nick Koston
3fd469cfe8
[esp8266][api] Store error strings in PROGMEM to reduce RAM usage ( #10568 )
2025-09-05 18:16:43 -05:00
J. Nick Koston
9aa21956c8
[api] Optimize single vector writes to use write() instead of writev() ( #10193 )
2025-08-11 15:41:08 -05:00
J. Nick Koston
c74f12be98
[api] Use C++17 nested namespace syntax ( #9856 )
2025-07-24 07:15:42 +00:00
J. Nick Koston
a45a45c688
[api] Split frame helper implementation into protocol-specific files ( #9746 )
2025-07-21 13:10:08 +12:00
J. Nick Koston and Copilot
5b5982cfdd
[api] Reduce memory usage by eliminating duplicate client info strings ( #9740 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-21 11:34:59 +12:00
J. Nick Koston
0aabdaa0c7
[api] Consolidate error handling and remove unused code ( #9726 )
2025-07-20 22:52:46 +00:00
J. Nick Koston
e474a33abd
[api] Memory optimizations for API frame helper buffering ( #9724 )
2025-07-21 10:20:35 +12:00
J. Nick Koston
8863188dd8
Apply existing protobuf buffer optimization to nested message encoding (~2.3x speed up) ( #9458 )
2025-07-13 06:55:32 +12:00
J. Nick Koston
143bf694c7
Optimize API flash usage by storing message size at compile time ( #9447 )
2025-07-11 19:38:23 -05:00
J. Nick Koston
3976fd02ea
Refactor duplicate socket read error handling in API frame helper ( #9370 )
2025-07-08 08:39:13 +12:00
J. Nick Koston
765793505d
Use std::span to eliminate heap allocation for single-packet API transmissions ( #9313 )
2025-07-07 14:53:23 +12:00
J. Nick Koston
15ef93ccc9
Optimize API connection loop performance ( #9184 )
2025-06-26 13:47:41 +12:00
J. Nick Koston
04f592ba6d
Fix slow noise handshake by reading multiple messages per loop ( #9130 )
2025-06-23 14:07:53 +12:00
487e1f871f
use `encode_uintXX` ( #8847 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-06-11 17:06:45 +12:00
J. Nick Koston
2ed5611a08
Replace API deferred queue with efficient message batching system ( #9012 )
2025-06-11 11:49:15 +12:00
Keith Burzinski
4f87bea788
[api] Streamline some log strings ( #8962 )
2025-06-03 21:53:32 +01:00
J. Nick Koston and Copilot
d64b49cc13
Optimize plaintext API header reading to reduce system calls ( #8941 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-05-28 20:46:23 -05:00
J. Nick Koston and Copilot
2ab1fe1abf
Use UINT16_MAX instead of hard coded 65535 in api ( #8884 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-05-22 23:51:06 +00:00
J. Nick Koston and Jesse Hills
377ed2e212
Optimize API frame helper buffer management ( #8805 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
2025-05-22 21:11:16 +00:00
J. Nick Koston
b0c1e0e28c
Refactor API frame helpers to enable buffer reuse ( #8825 )
2025-05-19 09:05:20 +12:00
J. Nick Koston
dd8d8ad952
Use fixed buffer for plaintext protocol like noise protocol ( #8800 )
2025-05-15 17:16:08 +12:00
J. Nick Koston
8465017db9
Consolidate write_raw_ implementation to reduce code duplication ( #8717 )
2025-05-09 12:10:44 +12:00
J. Nick Koston
ef2621aa54
Reserve space in the frame helper when we know in advance how much we need ( #8716 )
2025-05-08 17:43:39 +12:00
J. Nick Koston
ca78dd44b5
Include MAC address in noise hello ( #8551 )
2025-04-12 09:16:14 -10:00
J. Nick Koston
8269e2c961
Ensure plaintext responds with bad indicator byte before dropping the connection ( #8521 )
2025-04-09 10:27:23 +12:00
tomaszduda23
cbc03aae80
[code-quality] fix clang-tidy api ( #7279 )
2024-10-07 11:55:11 +13:00
Oxan van Leeuwen and Jesse Hills
14e38f0469
Upgrade clang-format to v13 ( #4535 )
...
* Upgrade clang-format to v13
* Apply clang-format-13 formatting changes
* Format
* Format bme_680
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
2023-03-20 03:38:41 +00:00
J. Nick Koston
ed4a7210d3
Ensure we never write zero bytes ( #4284 )
2023-01-16 13:24:32 +13:00
André Klitzing
72cce391ab
Fix some typos found by codespell ( #3598 )
2022-06-27 18:02:46 -03:00
Otto Winter
62f9736b1d
API: Expect a name for connections ( #2533 )
2022-01-20 12:03:32 +01:00
Oxan van Leeuwen
737188ae50
Fail hard if no random bytes available for encryption ( #3067 )
2022-01-18 14:29:57 +13:00
Oxan van Leeuwen
6383eca54a
Clean-up random helper functions ( #3022 )
2022-01-10 13:50:26 +13:00
Oxan van Leeuwen
beeb0c7c5a
Introduce hex parsing & formatting helper functions ( #2882 )
2021-12-13 09:15:23 +13:00
Oxan van Leeuwen
607601b3a4
Enable a bunch of clang-tidy checks ( #2149 )
2021-12-02 09:03:51 +13:00
Otto Winter
9220d9fc52
Fix socket connection closed not detected ( #2587 )
2021-10-22 10:46:44 +02:00