Photon Fusion 2.0.3

Public Types | Public Member Functions | Public Attributes | Properties | List of all members
NetworkConfiguration Class Reference

Main network configuration class. More...

Inherits IConfigurationSanityCheck.

Public Types

enum class  ReliableDataTransfers
 Flag for allowed Reliable Data transfer modes. More...
 

Public Member Functions

NetworkConfiguration Init ()
 Initializes and creates a copy of this NetworkProjectConfig. More...
 
void SanityCheck ()
 

Public Attributes

double ConnectionShutdownTime = 1
 Default delay between connection changes status to Shutdown (disconnected/invalid), and it actually being released (freeing all references to that particular connection). More...
 
double ConnectionTimeout = 10
 Max allowed time in seconds that the local peer can run without receiving any update from a remote peer. If a client does not receive any update from the server within this period, it will disconnect itself. If a server does not receive any update from a remote client within this period, it will disconnect that particular client. More...
 
ReliableDataTransfers ReliableDataTransferModes
 Current ReliableDataTransferModes mode. More...
 

Properties

int ConnectAttempts [get]
 Max number of connection attempts that a Client will run when trying to connect to a remote Server. More...
 
double ConnectInterval [get]
 Interval in seconds between each connection attempt from a Client. More...
 
double ConnectionDefaultRtt [get]
 Default assumed RTT in seconds for new connections (before actual RTT has been determined). The real RTT is calculated over time once the connection is established. More...
 
double ConnectionPingInterval [get]
 Interval in seconds between PING messages sent to a remote connection, in order to keep that connection alive. More...
 
int SocketRecvBufferSize [get]
 Size in Kilobytes of the underlying socket receive buffer. More...
 
int SocketSendBufferSize [get]
 Size in Kilobytes of the underlying socket send buffer. More...
 

Detailed Description

Main network configuration class.

Member Enumeration Documentation

◆ ReliableDataTransfers

enum ReliableDataTransfers
strong

Flag for allowed Reliable Data transfer modes.

Enumerator
ClientToServer 

Allow Client to Server.

ClientToClientWithServerProxy 

Allow Client to Client using Server as Proxy.

Member Function Documentation

◆ Init()

Initializes and creates a copy of this NetworkProjectConfig.

Returns
A copy of this NetworkProjectConfig.

Member Data Documentation

◆ ConnectionShutdownTime

double ConnectionShutdownTime = 1

Default delay between connection changes status to Shutdown (disconnected/invalid), and it actually being released (freeing all references to that particular connection).

◆ ConnectionTimeout

double ConnectionTimeout = 10

Max allowed time in seconds that the local peer can run without receiving any update from a remote peer. If a client does not receive any update from the server within this period, it will disconnect itself. If a server does not receive any update from a remote client within this period, it will disconnect that particular client.

◆ ReliableDataTransferModes

ReliableDataTransfers ReliableDataTransferModes
Initial value:
=
ReliableDataTransfers.ClientToServer |
ReliableDataTransfers.ClientToClientWithServerProxy
ReliableDataTransfers
Flag for allowed Reliable Data transfer modes.
Definition: SimulationConfig.NetworkConfiguration.cs:20

Current ReliableDataTransferModes mode.

Property Documentation

◆ ConnectAttempts

int ConnectAttempts
get

Max number of connection attempts that a Client will run when trying to connect to a remote Server.

◆ ConnectInterval

double ConnectInterval
get

Interval in seconds between each connection attempt from a Client.

◆ ConnectionDefaultRtt

double ConnectionDefaultRtt
get

Default assumed RTT in seconds for new connections (before actual RTT has been determined). The real RTT is calculated over time once the connection is established.

◆ ConnectionPingInterval

double ConnectionPingInterval
get

Interval in seconds between PING messages sent to a remote connection, in order to keep that connection alive.

Currently unused.

◆ SocketRecvBufferSize

int SocketRecvBufferSize
get

Size in Kilobytes of the underlying socket receive buffer.

◆ SocketSendBufferSize

int SocketSendBufferSize
get

Size in Kilobytes of the underlying socket send buffer.