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: solution.dll
Syntax
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()
This is invoked before the server and client(s) are started.
Override this method if you want to make any adjustments to their
NetworkManager instances.
Declaration
protected override void OnServerAndClientsCreated()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides
TestPeerDisconnectCallback(ClientDisconnectType, ulong)
Declaration
[UnityTestAttribute]
public IEnumerator TestPeerDisconnectCallback(PeerDisconnectCallbackTests.ClientDisconnectType clientDisconnectType, ulong disconnectedClient)
Parameters
Returns