docs.unity3d.com
    Show / Hide Table of Contents

    Class RelayServerMock

    Inheritance
    Object
    UDPSocketMock
    RelayServerMock
    Inherited Members
    UDPSocketMock.Dispose()
    UDPSocketMock.Close()
    UDPSocketMock.Send(Byte[], EndPoint)
    UDPSocketMock.Send(Byte[], Int32, EndPoint)
    UDPSocketMock.ExpectPacket(Byte[], Action<EndPoint, Byte[]>, PacketParameter[], Boolean)
    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 class RelayServerMock : UDPSocketMock, IDisposable

    Constructors

    RelayServerMock(String, UInt16)

    Declaration
    public RelayServerMock(string address, ushort port)
    Parameters
    Type Name Description
    String address
    UInt16 port

    Methods

    CompleteBind(NetworkDriver, Int32)

    Declaration
    public bool CompleteBind(NetworkDriver driver, int clientKey)
    Parameters
    Type Name Description
    NetworkDriver driver
    Int32 clientKey
    Returns
    Type Description
    Boolean

    CompleteConnect(NetworkDriver, out (NetworkConnection hostToClient, NetworkConnection clientToHost)[], NetworkDriver[])

    Declaration
    public bool CompleteConnect(NetworkDriver host, out (NetworkConnection hostToClient, NetworkConnection clientToHost)[] resultConnections, params NetworkDriver[] clients)
    Parameters
    Type Name Description
    NetworkDriver host
    (T1, T2)<NetworkConnection, NetworkConnection>[] resultConnections
    NetworkDriver[] clients
    Returns
    Type Description
    Boolean

    ExpectOptionalRepeatedPacket(Byte[])

    Declaration
    public void ExpectOptionalRepeatedPacket(byte[] packet)
    Parameters
    Type Name Description
    Byte[] packet

    GetRelayConnectionData(Int32)

    Declaration
    public RelayServerData GetRelayConnectionData(int clientKey)
    Parameters
    Type Name Description
    Int32 clientKey
    Returns
    Type Description
    RelayServerData

    IsBound(Int32)

    Declaration
    public bool IsBound(int clientKey)
    Parameters
    Type Name Description
    Int32 clientKey
    Returns
    Type Description
    Boolean

    RegisterBoundClient(RelayAllocationId, EndPoint)

    Declaration
    public void RegisterBoundClient(RelayAllocationId allocationId, EndPoint endpoint)
    Parameters
    Type Name Description
    RelayAllocationId allocationId
    EndPoint endpoint

    SetupForBind(Int32)

    Declaration
    public void SetupForBind(int clientKey)
    Parameters
    Type Name Description
    Int32 clientKey

    SetupForBindFail(Int32)

    Declaration
    public void SetupForBindFail(int key)
    Parameters
    Type Name Description
    Int32 key

    SetupForBindRetry(Int32, Action, Int32)

    Declaration
    public void SetupForBindRetry(int retryCount, Action onBindReceived, int clientKey)
    Parameters
    Type Name Description
    Int32 retryCount
    Action onBindReceived
    Int32 clientKey

    SetupForConnect(Int32)

    Declaration
    public void SetupForConnect(int clientKey)
    Parameters
    Type Name Description
    Int32 clientKey

    SetupForConnectRetry(Int32, Int32, Action)

    Declaration
    public void SetupForConnectRetry(int clientKey, int retryCount, Action onConnectReceived)
    Parameters
    Type Name Description
    Int32 clientKey
    Int32 retryCount
    Action onConnectReceived

    SetupForConnectTimeout(Int32)

    Declaration
    public void SetupForConnectTimeout(int clientKey)
    Parameters
    Type Name Description
    Int32 clientKey

    SetupForDisconnect(Int32, Int32)

    Declaration
    public void SetupForDisconnect(int from, int to)
    Parameters
    Type Name Description
    Int32 from
    Int32 to

    SetupForRelay(Int32, Int32, UInt16, Boolean)

    Declaration
    public void SetupForRelay(int from, int to, ushort dataLength, bool optional = false)
    Parameters
    Type Name Description
    Int32 from
    Int32 to
    UInt16 dataLength
    Boolean optional

    WaitForCondition(Func<Boolean>, Int64)

    Declaration
    public static void WaitForCondition(Func<bool> condition, long timeout = 2000L)
    Parameters
    Type Name Description
    Func<Boolean> condition
    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