feat(native): PR1A — fixed native baseline, buffer reduction, diagnostics#3
Open
mrmidi wants to merge 1 commit into
Open
feat(native): PR1A — fixed native baseline, buffer reduction, diagnostics#3mrmidi wants to merge 1 commit into
mrmidi wants to merge 1 commit into
Conversation
mrmidi
force-pushed
the
pr1a/native-baseline
branch
from
July 20, 2026 12:59
cbded50 to
e14f140
Compare
…tics Pin fptn submodule to 2016d5f (pr1a/ios-native-baseline). Socket buffers: - Remove conflicting 4 MiB / 1 MiB TCP buffer assignments (commented out for easy restoration). First experiment uses kernel default. - FPTN_IOS_SOCKET_BUFFER_BYTES CMake parameter for subsequent tests (256 KiB, 512 KiB) without source edits. - Buffers applied before TCP connect; effective values queried after. - Requested + effective values exposed in status struct. Beast reader: - 64 KiB initial reserve with a 256 KiB WebSocket message limit (was 4 MiB reserve). Packet path: - Remove SPDLOG_WARN + Mach task_info syscalls from packet callback adapter. Atomic counters remain for getStatus(). Concurrency: - io_context concurrency hint of 1 on iOS (was 4). Not a thread reduction — the wrapper already runs one native thread. Lifecycle counters: - Process-wide statics: live_clients, active_reader/sender_coroutines. - RAII guard handles all exit paths. Build manifest: - ios_socket_buffer_bytes added to manifest + cache validation. Wrapper status struct extended with 7 new fields (both app + tunnel). Tests: 22/22 passed. Debug build succeeded.
mrmidi
force-pushed
the
pr1a/native-baseline
branch
from
July 20, 2026 13:13
e14f140 to
ea9a792
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR1A — Native Fixed Baseline
Base:
pr0/native-build(stacked PR chain)fptn submodule:
fd56bb8(pr1a/ios-native-baseline)Socket buffers
ios_socket_buffer_bytesConan option on the fptn package (allowed: 0, 262144, 524288). Changing it changes the Conan package ID and recompiles the native library.-o "fptn/*:ios_socket_buffer_bytes=N"to everyconan installand validates the valueget_option(cross-platform); failure stores 0set_optionincrementssocket_buffer_set_error_countBeast reader
Packet path
SPDLOG_WARN+ two Machtask_infosyscalls frompacket_callback_adapter(fired every 500 packets)getStatus()reporting; unused locals removedConcurrency
thread_number→concurrency_hint(io_context hint, not thread count)TARGET_OS_IOS, 4 elsewhereProcess-wide lifecycle counters
static std::atomic<int>:live_clients_,active_reader_coroutines_,active_sender_coroutines_AtomicActivityGuardhandles normal returns, exceptions, and co_returnlive_clients_decrements afterStop()+ioc_.stop()completeBuild manifest
ios_socket_buffer_bytesadded to manifest + cache validationWrapper status struct
8 new fields in
WebsocketClientBridgeStatus(both app + tunnel Swift wrappers):requestedRcvbufBytes,requestedSndbufBytes,effectiveRcvbufBytes,effectiveSndbufBytes,liveClients,activeReaderCoroutines,activeSenderCoroutines,socketBufferSetErrorCountUnchanged (later PRs)
try_send, silent drop → PR1BVerification
Stack