class GameNetworkSystem
in global :: Sandbox . Network
An instance of this is created by the NetworkSystem when a server is joined, or created. You should not try to create this manually.
public bool AcceptConnection( Connection channel, ref string reason )
Called on the host to decide whether to accept a .
reasonThe reason to display to the client.
public void OnConnected( Connection client )
A client has connected to the server but hasn't fully finished joining yet.
public void OnJoined( Connection client )
Fully joined the server. Can be called when changing the map too. The game should usually create some object for the player to control here.
public void OnLeave( Connection client )
A client has disconnected from the server.
public void OnBecameHost( Connection previousHost )
The host left the server and you are now in charge.
public void OnHostChanged( Connection previousHost, Connection newHost )
The current host has been changed.
public static bool IsHost { get; }
True if we can be considered the host of this session. Either we're not connected to a server, or we are and we are the host.
public static bool IsClient { get; }
True if we're connected to a server and not the host.
public static bool IsConnecting { get; }
True if we're currently connecting to the server
public static bool IsActive { get; }
True if we're currently connected etc
public static Task<bool> TryConnectSteamId( ulong steamId )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public static void Connect( ulong steamid )
😔 No documentation found.
public static void Disconnect( )
😔 No documentation found.
public static Task<List<LobbyInformation>> QueryLobbies( )
😔 No documentation found.
public static void CreateLobby( )
😔 No documentation found.
public static void Connect( string target )
😔 No documentation found.
public GameNetworkSystem( )
😔 No documentation found.
public void AddHandler( Action<T,Connection,Guid> handler )
😔 No documentation found.
public void AddHandler( Func<T,Connection,Guid,Task> handler )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public IDisposable Push( )
😔 No documentation found.
public void Send( Guid connectionId, T obj )
😔 No documentation found.
public void Broadcast( T obj, Nullable<Connection.Filter> filter = null )
😔 No documentation found.
public void BroadcastRaw( ByteStream msg, Nullable<Connection.Filter> filter = null )
😔 No documentation found.
public void OnInitialize( )
😔 No documentation found.
public Task MountVPKs( Connection source, MountedVPKsResponse msg )
😔 No documentation found.
public Task SetSnapshotAsync( SnapshotMsg data )
😔 No documentation found.
public void GetSnapshot( Connection source, ref SnapshotMsg msg )
😔 No documentation found.
public void GetMountedVPKs( Connection source, ref MountedVPKsResponse msg )
😔 No documentation found.
public void AddHandler( Action<T,Connection> handler )
😔 No documentation found.
public void Dispose( )
😔 No documentation found.