s&
info
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
explore
Discover Games
category
Workshop
sports_esports
Games
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
menu_book
Learn
docs
Documentation
api
Api Reference
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
INetworkListener
chevron_left
API Reference
interface
INetworkListener
Methods
functions
AcceptConnection
functions
OnActive
functions
OnBecameHost
functions
OnConnected
functions
OnDisconnected
INetworkListener
A Sandbox.Component with this interface can react to network events.
interface
Sandbox.Component
.
abstract
Sandbox.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.