Class RelayServerMock
Inheritance
RelayServerMock
Syntax
public class RelayServerMock : UDPSocketMock, IDisposable
Constructors
RelayServerMock(String, UInt16)
Declaration
public RelayServerMock(string address, ushort port)
Parameters
Methods
CompleteBind(NetworkDriver, Int32)
Declaration
public bool CompleteBind(NetworkDriver driver, int clientKey)
Parameters
Returns
CompleteConnect(NetworkDriver, out (NetworkConnection hostToClient, NetworkConnection clientToHost)[], NetworkDriver[])
Declaration
public bool CompleteConnect(NetworkDriver host, out (NetworkConnection hostToClient, NetworkConnection clientToHost)[] resultConnections, params NetworkDriver[] clients)
Parameters
Returns
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
IsBound(Int32)
Declaration
public bool IsBound(int clientKey)
Parameters
Type |
Name |
Description |
Int32 |
clientKey |
|
Returns
RegisterBoundClient(RelayAllocationId, EndPoint)
Declaration
public void RegisterBoundClient(RelayAllocationId allocationId, EndPoint endpoint)
Parameters
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
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
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
SetupForRelay(Int32, Int32, UInt16, Boolean)
Declaration
public void SetupForRelay(int from, int to, ushort dataLength, bool optional = false)
Parameters
WaitForCondition(Func<Boolean>, Int64)
Declaration
public static void WaitForCondition(Func<bool> condition, long timeout = 2000L)
Parameters