diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-11-02 21:36:20 +0100 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-11-02 23:00:10 +0100 |
| commit | 8aafca259892d2f3d573ae4890470bdb7cfc62a8 (patch) | |
| tree | 19b7f9ce7912e4cd5f0984cfaa11587d29781437 /src/yuzu_cmd/nx2_sampler.cpp | |
| parent | e5a2a13175378f2ed8c900432712d4d838dfe8bf (diff) | |
network: fix ProxySocket receive edge cases
Routing recv() through RecvFrom made several old RecvFrom problems
reachable from the normal read path:
- A partial TCP read kept zero bytes in front of the unread data.
- A blocking read busy-waited with yield() and reported ETIMEDOUT.
- MSG_PEEK hit the flags == 0 assert.
- A UDP datagram larger than the buffer was dropped with EMSGSIZE.
Wait on a condition variable signalled when a packet arrives, and report
an expired wait as EAGAIN like an SO_RCVTIMEO timeout. Keep the existing
5s cap for sockets without a receive timeout. Allow MSG_PEEK. Truncate
oversized datagrams as BSD recv() does, and keep the unread tail of a
TCP packet for the next read.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
Diffstat (limited to 'src/yuzu_cmd/nx2_sampler.cpp')
0 files changed, 0 insertions, 0 deletions
