interface Component.INetworkListener

in global :: Sandbox

A with this interface can react to network events.


public bool AcceptConnection( Connection channel, ref string reason )

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

  • reason The reason to display to the client.

public void OnConnected( Connection channel )

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

public void OnDisconnected( Connection channel )

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

public void OnActive( Connection channel )

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

public void OnBecameHost( Connection previousHost )

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