docs.unity3d.com
    Show / Hide Table of Contents

    Class CommonUtilites

    Inheritance
    Object
    CommonUtilites
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Networking.Transport.Tests
    Syntax
    public static class CommonUtilites

    Fields

    MaxEventWaitTimeMS

    Declaration
    public const long MaxEventWaitTimeMS = 2000L
    Field Value
    Type Description
    Int64

    Methods

    CheckBuffer(Byte*, Int32)

    Declaration
    public static bool CheckBuffer(byte *bufferPtr, int size)
    Parameters
    Type Name Description
    Byte* bufferPtr
    Int32 size
    Returns
    Type Description
    Boolean

    ConnectServerAndClient(NetworkEndPoint, NetworkDriver, NetworkDriver, out NetworkConnection, out NetworkConnection)

    Declaration
    public static void ConnectServerAndClient(NetworkEndPoint endpoint, NetworkDriver server, NetworkDriver client, out NetworkConnection s2cConnection, out NetworkConnection c2sConnection)
    Parameters
    Type Name Description
    NetworkEndPoint endpoint
    NetworkDriver server
    NetworkDriver client
    NetworkConnection s2cConnection
    NetworkConnection c2sConnection

    CreateClient(CommonUtilites.SecureProtocolMode, NetworkSettings, INetworkInterface)

    Declaration
    public static NetworkDriver CreateClient(CommonUtilites.SecureProtocolMode secureMode, NetworkSettings settings = default(NetworkSettings), INetworkInterface netInterface = null)
    Parameters
    Type Name Description
    CommonUtilites.SecureProtocolMode secureMode
    NetworkSettings settings
    INetworkInterface netInterface
    Returns
    Type Description
    NetworkDriver

    CreateServer(CommonUtilites.SecureProtocolMode, NetworkSettings, INetworkInterface)

    Declaration
    public static NetworkDriver CreateServer(CommonUtilites.SecureProtocolMode secureMode, NetworkSettings settings = default(NetworkSettings), INetworkInterface netInterface = null)
    Parameters
    Type Name Description
    CommonUtilites.SecureProtocolMode secureMode
    NetworkSettings settings
    INetworkInterface netInterface
    Returns
    Type Description
    NetworkDriver

    FillBuffer(Byte*, Int32)

    Declaration
    public static void FillBuffer(byte *bufferPtr, int size)
    Parameters
    Type Name Description
    Byte* bufferPtr
    Int32 size

    RunPeriodicallyFor(Int64, Action)

    Declaration
    public static void RunPeriodicallyFor(long timeout, Action function)
    Parameters
    Type Name Description
    Int64 timeout
    Action function

    SetupServer(NetworkEndPoint, NetworkDriver)

    Declaration
    public static NetworkEndPoint SetupServer(NetworkEndPoint endpoint, NetworkDriver driver)
    Parameters
    Type Name Description
    NetworkEndPoint endpoint
    NetworkDriver driver
    Returns
    Type Description
    NetworkEndPoint

    WaitForAcceptedConnection(NetworkDriver, NetworkDriver)

    Declaration
    public static NetworkConnection WaitForAcceptedConnection(NetworkDriver server, NetworkDriver client)
    Parameters
    Type Name Description
    NetworkDriver server
    NetworkDriver client
    Returns
    Type Description
    NetworkConnection

    WaitForCondition(Func<Boolean>, String, Int64)

    Declaration
    public static void WaitForCondition(Func<bool> condition, string message = "Timed out while waiting for a condition.", long timeout = 2000L)
    Parameters
    Type Name Description
    Func<Boolean> condition
    String message
    Int64 timeout

    WaitForDataEvent(NetworkDriver, out DataStreamReader)

    Declaration
    public static void WaitForDataEvent(NetworkDriver driver, out DataStreamReader stream)
    Parameters
    Type Name Description
    NetworkDriver driver
    DataStreamReader stream

    WaitForEvent(NetworkEvent.Type, NetworkDriver, Int64)

    Declaration
    public static void WaitForEvent(NetworkEvent.Type type, NetworkDriver driver, long timeout = 2000L)
    Parameters
    Type Name Description
    NetworkEvent.Type type
    NetworkDriver driver
    Int64 timeout
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023