docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NetworkSettings

    An aggregate of the different parameter structures that describe a network configuration.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Networking.Transport
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public struct NetworkSettings : IDisposable

    Constructors

    NetworkSettings(Allocator)

    Creates a new settings object using the provided allocator. If no allocator is provided, Allocator.Temp will be used.

    Declaration
    public NetworkSettings(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    Allocator to use to create the object.

    Properties

    IsCreated

    If the settings have been created (e.g. not disposed).

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    bool

    True if created, false otherwise.

    Methods

    AddRawParameterStruct<T>(ref T)

    Add a new parameter structure to the list. Only one instance of any parameter type is stored at a time. Adding a new instance of an existing parameter structure will overwrite the one that is already stored.

    Declaration
    public void AddRawParameterStruct<T>(ref T parameter) where T : unmanaged, INetworkParameter
    Parameters
    Type Name Description
    T parameter

    Parameter structure to add.

    Type Parameters
    Name Description
    T

    Type of INetworkParameter to add.

    Exceptions
    Type Condition
    ArgumentException

    If the parameters contain invalid values. Note that this exception is only thrown when collections checks are enabled (i.e. in the editor). Otherwise an error is logged and the parameters are added anyway.

    AsReadOnly()

    Get a read-only copy of the settings.

    Declaration
    public NetworkSettings AsReadOnly()
    Returns
    Type Description
    NetworkSettings

    A read-only copy of the settings.

    Dispose()

    Declaration
    public void Dispose()

    TryGet<T>(out T)

    Try to get the parameter structure for the specified type.

    Declaration
    public bool TryGet<T>(out T parameter) where T : unmanaged, INetworkParameter
    Parameters
    Type Name Description
    T parameter

    Stored parameter structure (if true is returned).

    Returns
    Type Description
    bool

    True if the parameter structure is in the settings.

    Type Parameters
    Name Description
    T

    Type of the parameter structure to get.

    Implements

    IDisposable

    Extension Methods

    BaselibNetworkParameterExtensions.WithBaselibNetworkInterfaceParameters(ref NetworkSettings, int, int, uint)
    CommonNetworkParametersExtensions.GetNetworkConfigParameters(ref NetworkSettings)
    CommonNetworkParametersExtensions.WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int, int, int, int)
    CommonNetworkParametersExtensions.WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int, int, int, int, int)
    LoggingParameterExtensions.WithLoggingParameters(ref NetworkSettings, FixedString32Bytes)
    NetworkSimulatorParameterExtensions.WithNetworkSimulatorParameters(ref NetworkSettings, float, float, uint, uint, float)
    RelayParameterExtensions.GetRelayParameters(ref NetworkSettings)
    RelayParameterExtensions.WithRelayParameters(ref NetworkSettings, ref RelayServerData, int)
    SecureParameterExtensions.GetSecureParameters(ref NetworkSettings)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string, string, string, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString512Bytes)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString512Bytes)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString512Bytes)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedPEMString, ref FixedString512Bytes)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString, ref FixedPEMString, ref FixedString512Bytes)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, string, string)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, string, string, string, string, SecureClientAuthPolicy)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString512Bytes, SecureClientAuthPolicy)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString, ref FixedPEMString, ref FixedString512Bytes, SecureClientAuthPolicy)
    FragmentationStageParameterExtensions.GetFragmentationStageParameters(ref NetworkSettings)
    FragmentationStageParameterExtensions.WithFragmentationStageParameters(ref NetworkSettings, int)
    ReliableStageParameterExtensions.GetReliableStageParameters(ref NetworkSettings)
    ReliableStageParameterExtensions.WithReliableStageParameters(ref NetworkSettings, int, int, int)
    SimulatorStageParameterExtensions.GetSimulatorStageParameters(ref NetworkSettings)
    SimulatorStageParameterExtensions.WithSimulatorStageParameters(ref NetworkSettings, int, int, ApplyMode, int, int, int, int, int, int, int, uint)
    WebSocketParameterExtensions.GetWebSocketParameters(ref NetworkSettings)
    WebSocketParameterExtensions.WithWebSocketParameters(ref NetworkSettings, FixedString128Bytes)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)