NetworkingSettingsclass

A class that holds all configured networking settings for a game. This is serialized as a config and shared from the server to the client.

object→ConfigData→NetworkingSettings
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.NetworkingSettings : Sandbox.ConfigData

Constructors1

Showing 1 constructors

Properties6

Showing 6 properties

public bool Sandbox.NetworkingSettings.AutoSwitchToBestHost { get; set; }PUBLICGETSETOBSOLETE

No longer does anything. The host only changes when the current host leaves.

Obsolete: The host only changes when the current host leaves

Returns:bool—

public bool Sandbox.NetworkingSettings.ClientsCanDestroyObjects { get; set; }PUBLICGETSET

By default, can clients destroy objects. This can be changed per connection after join.

Returns:bool—

public bool Sandbox.NetworkingSettings.ClientsCanRefreshObjects { get; set; }PUBLICGETSET

By default, can clients refresh objects. This can be changed per connection after join.

Returns:bool—

public bool Sandbox.NetworkingSettings.ClientsCanSpawnObjects { get; set; }PUBLICGETSET

By default, can clients create objects. This can be changed per connection after join.

Returns:bool—

public bool Sandbox.NetworkingSettings.DestroyLobbyWhenHostLeaves { get; set; }PUBLICGETSET

Whether to end the game when the host leaves. By default the host hands the game to another player when they leave, and everyone carries on from a snapshot of the game. Anything a late joiner would see correctly survives the handoff.

Returns:bool—

public float Sandbox.NetworkingSettings.UpdateRate { get; set; }PUBLICGETSETPER-FRAME

The frequency at which the network system will send updates to clients. Higher is better but you probably want to stay in the 10-60 range.

Returns:float—

On this page