# Sandbox.Component.INetworkListener.OnHostChanged

```csharp
void OnHostChanged(Connection previousHost, Connection newHost)
```

Another player took over as host and the scene was rebuilt from their snapshot. The new
host gets [Sandbox.Component.INetworkListener.OnBecameHost](/api/Sandbox.Component.INetworkListener/OnBecameHost) instead.

### Parameters

- `previousHost` (`Connection`)
- `newHost` (`Connection`)

Declared in [Sandbox.Component.INetworkListener](/api/Sandbox.Component.INetworkListener).
Assembly: `Sandbox.Engine`.
