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>
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>
--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>