Photon .NET Client API
Public Member Functions | Public Attributes | Properties | List of all members
ExitGames.Client.Photon.NetworkSimulationSet Class Reference

A set of network simulation settings, enabled (and disabled) by PhotonPeer.IsSimulationEnabled. More...

Public Member Functions

override string ToString ()
 

Public Attributes

readonly ManualResetEvent NetSimManualResetEvent = new ManualResetEvent(false)
 

Properties

int OutgoingLag [get, set]
 Outgoing packages delay in ms. Default: 100. More...
 
int OutgoingJitter [get, set]
 Randomizes OutgoingLag by [-OutgoingJitter..+OutgoingJitter]. Default: 0. More...
 
int OutgoingLossPercentage [get, set]
 Percentage of outgoing packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. More...
 
int IncomingLag [get, set]
 Incoming packages delay in ms. Default: 100. More...
 
int IncomingJitter [get, set]
 Randomizes IncomingLag by [-IncomingJitter..+IncomingJitter]. Default: 0. More...
 
int IncomingLossPercentage [get, set]
 Percentage of incoming packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. More...
 
int LostPackagesOut [get, set]
 Counts how many outgoing packages actually got lost. TCP connections ignore loss and this stays 0. More...
 
int LostPackagesIn [get, set]
 Counts how many incoming packages actually got lost. TCP connections ignore loss and this stays 0. More...
 

Detailed Description

A set of network simulation settings, enabled (and disabled) by PhotonPeer.IsSimulationEnabled.

For performance reasons, the lag and jitter settings can't be produced exactly. In some cases, the resulting lag will be up to 20ms bigger than the lag settings. Even if all settings are 0, simulation will be used. Set PhotonPeer.IsSimulationEnabled to false to disable it if no longer needed.

All lag, jitter and loss is additional to the current, real network conditions. If the network is slow in reality, this will add even more lag. The jitter values will affect the lag positive and negative, so the lag settings describe the medium lag even with jitter. The jitter influence is: [-jitter..+jitter]. Packets "lost" due to OutgoingLossPercentage count for BytesOut and LostPackagesOut. Packets "lost" due to IncomingLossPercentage count for BytesIn and LostPackagesIn.

Member Function Documentation

override string ExitGames.Client.Photon.NetworkSimulationSet.ToString ( )
inline

Member Data Documentation

readonly ManualResetEvent ExitGames.Client.Photon.NetworkSimulationSet.NetSimManualResetEvent = new ManualResetEvent(false)

Property Documentation

int ExitGames.Client.Photon.NetworkSimulationSet.IncomingJitter
getset

Randomizes IncomingLag by [-IncomingJitter..+IncomingJitter]. Default: 0.

int ExitGames.Client.Photon.NetworkSimulationSet.IncomingLag
getset

Incoming packages delay in ms. Default: 100.

int ExitGames.Client.Photon.NetworkSimulationSet.IncomingLossPercentage
getset

Percentage of incoming packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting.

int ExitGames.Client.Photon.NetworkSimulationSet.LostPackagesIn
getset

Counts how many incoming packages actually got lost. TCP connections ignore loss and this stays 0.

int ExitGames.Client.Photon.NetworkSimulationSet.LostPackagesOut
getset

Counts how many outgoing packages actually got lost. TCP connections ignore loss and this stays 0.

int ExitGames.Client.Photon.NetworkSimulationSet.OutgoingJitter
getset

Randomizes OutgoingLag by [-OutgoingJitter..+OutgoingJitter]. Default: 0.

int ExitGames.Client.Photon.NetworkSimulationSet.OutgoingLag
getset

Outgoing packages delay in ms. Default: 100.

int ExitGames.Client.Photon.NetworkSimulationSet.OutgoingLossPercentage
getset

Percentage of outgoing packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting.


The documentation for this class was generated from the following file: