# Sandbox.Networking

Global manager to hold and tick the singleton instance of NetworkSystem.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: static, abstract, sealed

## Properties

- [`Connections`](/api/Sandbox.Networking/Connections): A list of connections that are currently on this server. If you're not on a server this will return only one connection (Connection.Local). Some games restrict the connection list - in which case you will get an empty list.
- [`HostConnection`](/api/Sandbox.Networking/HostConnection): The connection of the current network host.
- [`HostStats`](/api/Sandbox.Networking/HostStats): Get the latest host stats such as bandwidth used and the current frame rate.
- [`IsActive`](/api/Sandbox.Networking/IsActive): True if we're currently connecting to the server
- [`IsClient`](/api/Sandbox.Networking/IsClient): True if we're currently connected to a server, and we are not the host
- [`IsConnecting`](/api/Sandbox.Networking/IsConnecting): True if we're currently connecting to the server
- [`IsHost`](/api/Sandbox.Networking/IsHost): True if we can be considered the host of this session. Either we're not connected to a server, or we are host of a server.
- [`MapName`](/api/Sandbox.Networking/MapName): The name of the map being used on the server you're connected to.
- [`MaxPlayers`](/api/Sandbox.Networking/MaxPlayers): The maximum number of players allowed on the server you're connected to.
- [`ServerName`](/api/Sandbox.Networking/ServerName): The name of the server you are currently connected to.

## Methods

- [`Connect`](/api/Sandbox.Networking/Connect)
- [`CreateLobby`](/api/Sandbox.Networking/CreateLobby): Will create a new lobby with the specified [Sandbox.Network.LobbyConfig](/api/Sandbox.Network.LobbyConfig) to customize the lobby further.
- [`Disconnect`](/api/Sandbox.Networking/Disconnect): Disconnect from current multiplayer session.
- [`FindConnection`](/api/Sandbox.Networking/FindConnection)
- [`GetData`](/api/Sandbox.Networking/GetData): Get data about the current server or lobby. This data can be used for filtering when querying lobbies.
- [`JoinBestLobby`](/api/Sandbox.Networking/JoinBestLobby): Try to join the best lobby. Return true on success.
- [`QueryLobbies`](/api/Sandbox.Networking/QueryLobbies): Get all lobbies for the current game.
- [`SetData`](/api/Sandbox.Networking/SetData): Set data about the current server or lobby. Other players can query this when searching for a game. Note: for now, try to keep the key and value as short as possible, Steam enforce a character limit on server tags, so it could be possible to reach that limit when running a Dedicated Server. In the future we'll store this stuff on our backend, so that won't be a problem.
- [`TryConnectSteamId`](/api/Sandbox.Networking/TryConnectSteamId)
