Table of Contents

Class NetworkRules

Namespace
SteamNetworkLib.Core
Assembly
SteamNetworkLib.dll

Configurable network rules that influence how SteamNetworkLib behaves.

public class NetworkRules
Inheritance
NetworkRules
Inherited Members

Constructors

NetworkRules()

public NetworkRules()

Properties

AcceptOnlyFriends

If true, only accept P2P sessions from friends (auto-filter in callback).

public bool AcceptOnlyFriends { get; set; }

Property Value

bool

DefaultSendType

Default send type when a policy does not supply one.

public EP2PSend DefaultSendType { get; set; }

Property Value

EP2PSend

EnableRelay

Enables Steam relay usage for NAT traversal. Applied via SteamNetworking.AllowP2PPacketRelay().

public bool EnableRelay { get; set; }

Property Value

bool

MaxReceiveChannel

Maximum channel index to poll for incoming packets (IL2CPP).

public int MaxReceiveChannel { get; set; }

Property Value

int

MessagePolicy

Optional message policy to choose channel and send type per message. If null, DefaultSendType and caller-provided channel are used.

public Func<P2PMessage, (int channel, EP2PSend sendType)> MessagePolicy { get; set; }

Property Value

Func<P2PMessage, (int channel, EP2PSend sendType)>

MinReceiveChannel

Minimum channel index to poll for incoming packets (IL2CPP).

public int MinReceiveChannel { get; set; }

Property Value

int