Class PeerDisconnectCallbackTests
Validates the client disconnection process.
This assures that:
- When a client disconnects from the server that the server:
-- Detects the client disconnected.
-- Cleans up the transport to NGO client (and vice versa) mappings.
- When a server disconnects a client that:
-- The client detects this disconnection.
-- The server cleans up the transport to NGO client (and vice versa) mappings.
- When DestroyWithOwner the server-side player object is destroyed
- When DontDestroyWithOwner the server-side player object ownership is transferred back to the server
Inheritance
PeerDisconnectCallbackTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Server })]
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Host })]
public class PeerDisconnectCallbackTests : NetcodeIntegrationTest
Constructors
PeerDisconnectCallbackTests(HostOrServer)
Declaration
public PeerDisconnectCallbackTests(NetcodeIntegrationTest.HostOrServer hostOrServer)
Parameters
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
OnServerAndClientsCreated()
Declaration
protected override void OnServerAndClientsCreated()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides
TestPeerDisconnectCallback(ClientDisconnectType, ulong)
Declaration
[UnityTest]
public IEnumerator TestPeerDisconnectCallback(PeerDisconnectCallbackTests.ClientDisconnectType clientDisconnectType, ulong disconnectedClient)
Parameters
Returns