|
Kanda Foundation 0.2.0
|
The Kanda SDK provides several connection monitoring capabilities to help you manage and respond to various network-related events in your application. This functionality is designed to work well with downstream SDK packages.
Connection monitoring in the Kanda SDK consists of three main features:
These systems generate app events that you can listen for and react to in downstream logic, providing you with real-time information about the state of client connections.
The disconnect monitoring system tracks when clients disconnect from the server. It detects various disconnect scenarios and provides information about the reason for disconnection.
The timeout monitoring system keeps track of clients that are in the process of connecting. If a client takes too long to establish a connection, the system will generate a timeout event.
The player count monitoring system tracks the number of active players in a session. This is particularly useful for dedicated server scenarios where you need to report the current player count to a game server hosting service.
Most of the monitoring systems generate specific app events that you can query for in downstream logic. These events include:
ClientDisconnectEventData: Contains information about a client disconnectionClientTimeoutEventData: Indicates that a client connection attempt has timed outTo use these events, you can create systems that react to these app events and implement the appropriate logic.