Api INetworkListener
interface

INetworkListener

public interface INetworkListener

A Component with this interface can react to network events.

Methods

virtual Boolean AcceptConnection(Connection channel, String reason)

Called on the host to decide whether to accept a Connection. If any Component that implements this returns false, the connection will be denied.

channel
reason — The reason to display to the client.
virtual Void OnConnected(Connection channel)

Called when someone joins the server. This will only be called for the host.

virtual Void OnDisconnected(Connection channel)

Called when someone leaves the server. This will only be called for the host.

virtual Void OnActive(Connection channel)

Called when someone is all loaded and entered the game. This will only be called for the host.

virtual Void OnBecameHost(Connection previousHost)

Called when the host of the game has left - and you are now the new host.

Assembly: Sandbox.Engine Declaring Type: Component Full Name: Sandbox.Component.INetworkListener