bool IsHost { get; set; }

robot_2Generated
code_blocksInput

Description

The IsHost property of the Connection class indicates whether the current connection is the host of the network session. This property is useful for determining if the connection has host privileges, which typically include the ability to manage the session, kick players, and perform other administrative tasks.

Usage

To use the IsHost property, you can access it directly from an instance of the Connection class. This property is read-only and returns a bool value.

Example usage:

Connection connection = ...; // Assume this is an initialized connection object
if (connection.IsHost)
{
    // Perform host-specific actions
}

Example

Connection connection = ...; // Assume this is an initialized connection object
if (connection.IsHost)
{
    // Perform host-specific actions
}