s&
infoAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games exploreDiscover Games
categoryWorkshop
sports_esportsGames landscapeMaps view_in_arModels textureMaterials apparelClothing constructionMore..
forumForum menu_bookLearn
docsDocumentation apiApi Reference schoolTutorials manage_searchCode Search
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
INetworkListener
chevron_left API Reference
interface
INetworkListener

Methods

functionsAcceptConnectionfunctionsOnActivefunctionsOnBecameHostfunctionsOnConnectedfunctionsOnDisconnected
INetworkListener
A Sandbox.Component with this interface can react to network events.
interface Sandbox.Component .
abstractSandbox.Engine

functions Methods 5

AcceptConnection (channel, reason)
bool
Called on the host to decide whether to accept a Sandbox.Connection. If any Sandbox.Component that implements this returns false, the connection will be denied.
OnActive (channel)
Called when someone is all loaded and entered the game. This will only be called for the host.
OnBecameHost (previousHost)
Called when the host of the game has left - and you are now the new host.
OnConnected (channel)
Called when someone joins the server. This will only be called for the host.
OnDisconnected (channel)
Called when someone leaves the server. This will only be called for the host.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter