Commit Graph
21 Commits
Author SHA1 Message Date
libretroadmin 5f0f72bfda Remove sleeps and timed polling from networking
Socket waits now block in select() on the socket plus a wake or cancel
socket (Common/Net/Cancel), so a stop or cancel ends them at once.

- HTTP: cancel flags become net::CancelToken; Connect waits once on all
  addresses, receives wait instead of spinning, no DNS retry sleep.
- Adhoc: the friend finder and adhoc server block on their sockets with
  a wake socket and a deadline; matching runs on a CoreTiming tick
  instead of two threads (savestate section bumped).
- sceNetInet select/poll check without blocking and park the HLE thread,
  re-checked from a CoreTiming event until ready or the emulated
  timeout.
- Vendor the aemu_postoffice client (was a submodule) with no sleeps:
  waits on the socket, close via shutdown and an eventcount, cancelable
  connects, and lock-free session slot claims.
- PortManager waits without a timeout; PSP_InitWait replaces the
  headless boot poll.
- TimeUtil: sleep_us/sleep_ms only outside the core; sleep_precise,
  sleep_random, yield and the Windows timer period are gone.
- Unit test for the socket waits.
2026-10-08 17:58:46 +02:00
Henrik Rydgård 1aef267acc Add more information to ImDebugger (ApCtl) 2025-01-21 12:22:32 +01:00
Henrik Rydgård 5d124d93f8 Make network connection detection (for pause screen purposes) a bit more strict. 2025-01-21 12:22:29 +01:00
Henrik Rydgård 58f336f64d Infrastructure: Only connect to adhoc server if connect_adhoc_for_grouping is set in the json 2025-01-20 20:58:22 +01:00
Henrik Rydgård 42a2dfbbc1 Convert more code 2025-01-19 17:34:29 +01:00
Henrik Rydgård fbd548dde5 struct style fix. no need to pragma(pack) them 2025-01-10 21:22:16 +01:00
Henrik Rydgård 5c7ca3f972 Delete some unused structs 2025-01-10 21:18:45 +01:00
Henrik Rydgård 885724db83 Add comments (checked that no other host socket numbers leak to the game) 2025-01-10 14:54:45 +01:00
Henrik Rydgård c3aa0f7452 Centralize socket-related includes, introduce socket_errno
This resolves some weird inconsistentes and include order problems
related to errno. Needed for the next steps.
2025-01-08 12:42:45 +01:00
Henrik Rydgård baf6bcc41e Hide the "Not supported" notice. Minor cleanups 2025-01-08 09:24:32 +01:00
Henrik Rydgård 9b82a9f180 Move all the Inet enum mappers to Core/HLE/NetInetConstants. Other cleanup. 2025-01-07 19:45:16 +01:00
Henrik Rydgård 8d16ea408e Buildfix 2025-01-07 15:33:15 +01:00
Henrik Rydgård 895d8eb7fa Try ANR2ME's sceNetInet implementation 2025-01-07 10:31:32 +01:00
Henrik Rydgård 1dc93ef8db Fixes. Wipeout Pulse gets further but not working 2025-01-06 17:17:59 +01:00
Henrik Rydgård 110d404911 Add a missing socket option name 2025-01-06 16:10:46 +01:00
ANR2ME 07f3249af5 Implement sceNetInetInetAddr which seems to be used too by many games along with sceHttp syscalls 2025-01-05 19:22:45 +01:00
Henrik Rydgård 56dd10f283 Fix savestates 2025-01-05 00:00:06 +01:00
White Blood Cell 727203e88f Move flags and other constants from InetSocket onto SceNetInet. 2025-01-04 18:03:44 +01:00
White Blood Cell 4bc79481da Translate all input parameters to socket(). 2025-01-04 18:03:44 +01:00
White Blood Cell 87de5b6385 Add header to sceNetInet and audit hleLogError calls for SetLastError. 2025-01-04 17:56:58 +01:00
White Blood CellandAdamN ee0b0fce6c sceNetInet and sceNetResolver support.
Co-authored-by: AdamN <anr2000@gmail.com>
2025-01-04 17:28:36 +01:00