Skip to content

docs(libSceNet): correct when sceNetAccept reads the inherited nonblocking mode - #9357

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
thuanquang:docs/debt-sweep-net-accept
Oct 25, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
thuanquang:docs/debt-sweep-net-accept

Conversation

@thuanquang

@thuanquang thuanquang commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

One statement in docs/dev/debt/libSceNet.md no longer matches main; it is replaced with what main does now, and nothing else in the entry changes.

  • sceNetAccept: "The mode is sampled when accept starts; changes between connection creation and accept are not modelled". On origin/main, struct Sock (core/libs/prx/libSceNet/Export.cpp:212) has no nonblock copy any more. The flag is the shared std::atomic<bool> nonblock in NativeSocketHandle (Export.cpp:144), and sceNetSetsockopt changes it while sockets are in use (Export.cpp:1340). sceNetAccept reads listener.native->nonblock only at Export.cpp:963, after the host accept in native_transfer has returned (Export.cpp:936-941) and the new socket has been created and registered (Export.cpp:944-962). So an SO_NBIO change made while accept waits carries over to the accepted socket. Commit 1b182e7 (PR fix(net): keep MSG_DONTWAIT transfers nonblocking on Windows #8653) changed this; when 1fee29b wrote the sentence, the check read a by-value listener.nonblock copied before ::accept. Now: "The mode is read after the host accept returns; changes between connection creation and accept are not modelled."

Tested

Docs only; nothing was built or run. On origin/main 1698d1e I counted the old sentence in docs/dev/debt/libSceNet.md (it occurs once, at line 182) and read these parts of core/libs/prx/libSceNet/Export.cpp: NativeSocketHandle (144), struct Sock (212-224), native_transfer (454-495), sceNetAccept (924-976) and the SO_NBIO store in sceNetSetsockopt (1320-1345); I also confirmed 1b182e7 and its PR #8653 merge 7697443 are ancestors of origin/main. (main 1896871ba7). Each statement was found by a read-only sweep of the debt files and confirmed by two independent verifier passes and a final check on current main. No open pull request edits these sentences (checked against every open PR's diff of this file).

  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Not tested: behaviour on any machine; this changes text only.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

…cking mode

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5836 docs/dev/debt/libSceNet.md
PR 9494 docs/dev/debt/libSceNet.md
PR 9727 docs/dev/debt/libSceNet.md
PR 9733 docs/dev/debt/libSceNet.md
PR 9948 docs/dev/debt/libSceNet.md
PR 10502 docs/dev/debt/libSceNet.md

@github-actions github-actions Bot added the docs label Oct 22, 2026
@adriadam10 adriadam10 self-assigned this Oct 25, 2026
@adriadam10
adriadam10 merged commit a2f634b into boykopovar:main Oct 25, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the changed sentence against sceNetAccept and NativeSocketHandle on main: the listener's nonblock is the shared atomic and is read after the host accept returns; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants