public record class NetworkSimulationProfileHow bad the network is pretending to be.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The delays and losses apply to what the endpoint holding the profile sends, so Latency is one way. Wrapping both ends of a connection — the usual case in a test — gives a round trip of twice it.
Loss and duplication only ever touch channels whose contract permits them (MayDrop, MayDuplicate). A simulation that dropped a Reliable payload would not be simulating a bad network, it would be simulating a broken transport, and the layer above is entitled to assume that never happens.
Fields and properties (9)
public static NetworkSimulationProfile PerfectA perfect wire. What the simulation does when it is switched on but told to do nothing.
public static NetworkSimulationProfile LanTwo players on one switch.
public static NetworkSimulationProfile BroadbandOrdinary home broadband to a regional server. The profile a development build should run with by default: netcode written on localhost is netcode that breaks on release day.
public static NetworkSimulationProfile MobileA phone on a good day.
public static NetworkSimulationProfile AwfulA phone on a train. Not a plausible target — a deliberate stress case.
public TimeSpan LatencyThe one-way delay added to everything sent.
public TimeSpan JitterHow far either side of Latency a delay may land, drawn uniformly. This is also where reordering comes from: two unordered payloads with different draws arrive in whichever order their draws put them, which is what really happens and is not worth modelling separately.
public double LossChanceThe chance, from 0 to 1, that a droppable payload is thrown away instead of sent.
public double DuplicateChanceThe chance, from 0 to 1, that a duplicable payload is sent twice, the copy drawing its own jitter.
Used by (6)
- LocalMatchMultiplayer
- HarnessVixen.Net.Tests
- NetworkSimulationVixen.Net
- NetworkSimulationTestsVixen.Net.Tests
- SessionTestsVixen.Net.Tests
- SimulatedTransportConformanceTestsVixen.Net.Tests