Commit Graph
2 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 7d17f071d2 Ad hoc: Make the transport when ad hoc starts
Transport() returned one of two static transports, picked on each call. Now SetupAdhocRelayMode()
makes the one for the session, wrapped in the network simulation when its options are on, and
sceNetAdhocTerm frees it after the sockets. The simulation owns the transport it wraps and no longer
needs to check each call whether it's on.

The friend finder thread binds its server connection by serverHasRelay itself, since it can run with
no transport (adhocctl stays connected through sceNetAdhocTerm), as can the adhocctl poll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:55:26 +01:00
Henrik RydgårdandClaude Opus 5.5 64624ef32a Ad hoc: Options to simulate a slow network
--adhoc-delay, --adhoc-jitter and --adhoc-loss (AdhocSimDelayMs, AdhocSimJitterMs and
AdhocSimLossPercent in the ini) delay and drop ad hoc traffic, in emulated time, to find games that
can't cope with a real network's latency.

They're a transport, NetSimTransport, around whichever one is in use, so they work the same for the
relay and P2P. PDP datagrams are held on arrival; PTP sends are held before they go, and a "lost" one
goes a retransmit interval later instead. PtpSendNow is new in the transports, for those delayed sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:10:57 +01:00