Commit Graph
3 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 fc2a33ba94 sceNetAdhoc: PDP and PTP sends and receives, and PollSocket, take longer the more they handle
pspautotests net/adhoc/sizes measures, roughly: PdpSend takes 50 us plus
20 ns a byte (to a peer, to everyone, to nobody or to itself), PdpRecv
of waiting data 15 us plus 11 ns a byte, PtpSend 95 us plus 70 ns a
byte, PtpRecv 25 us plus 12 ns a byte, and PollSocket 20 us plus 1 us a
socket. We charged 10-50 us whatever the size, and nothing at all for a
PdpSend to a MAC nobody has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 22:26:55 +01:00
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