Photon Fusion 1.1.12

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

Main network configuration class. More...

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

Public Attributes

int ConnectAttempts = 10
 Max number of connection attempts that a Client will run when trying to connect to a remote Server. More...
 
double ConnectInterval = 0.5
 Interval in seconds between each connection attempt from a Client. More...
 
double ConnectionDefaultRtt = 0.1
 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 = 1
 Interval in seconds between PING messages sent to a remote connection, in order to keep that connection alive. More...
 
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...
 
int MtuDefault = NetPeer.MAX_MTU_BYTES
 Max number of bytes that can be used by Fusion to fill up a UDP package. More...
 
ReliableDataTransfers ReliableDataTransferModes
 Current ReliableDataTransferModes mode. More...
 
int SocketRecvBufferSize = 256
 Size in Kilobytes of the underlying socket receive buffer. More...
 
int SocketSendBufferSize = 256
 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

Member Data Documentation

◆ ConnectAttempts

int ConnectAttempts = 10

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

◆ ConnectInterval

double ConnectInterval = 0.5

Interval in seconds between each connection attempt from a Client.

◆ ConnectionDefaultRtt

double ConnectionDefaultRtt = 0.1

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

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

Currently unused.

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

◆ MtuDefault

int MtuDefault = NetPeer.MAX_MTU_BYTES

Max number of bytes that can be used by Fusion to fill up a UDP package.

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

◆ SocketRecvBufferSize

int SocketRecvBufferSize = 256

Size in Kilobytes of the underlying socket receive buffer.

◆ SocketSendBufferSize

int SocketSendBufferSize = 256

Size in Kilobytes of the underlying socket send buffer.