API ReferenceSandbox
SceneNetworkSystemclass
This is created and referenced by the network system, as a way to route.
Methods15
Showing 15 methods
public virtual bool AcceptConnection(Sandbox.Connection channel, string reason)
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.
| Parameter | Type | Description |
|---|---|---|
| channel | Connection | — |
| reason | string | The reason to display to the client. |
Returns:
bool—public virtual void Dispose()
Returns:
void—public virtual void GetMountedVPKs(Sandbox.Connection source, Sandbox.Network.MountedVPKsResponse msg)
A client has joined and wants to know what VPKs to preload.
| Parameter | Type | Description |
|---|---|---|
| source | Connection | — |
| msg | MountedVPKsResponse | — |
Returns:
void—public virtual void GetSnapshot(Sandbox.Connection source, Sandbox.Network.SnapshotMsg msg)
A client has joined and wants a snapshot of the world.
| Parameter | Type | Description |
|---|---|---|
| source | Connection | — |
| msg | SnapshotMsg | — |
Returns:
void—public virtual System.Threading.Tasks.Task MountVPKs(Sandbox.Connection source, Sandbox.Network.MountedVPKsResponse msg)
Asynchronously load and mount any VPKs from the provided server response.
| Parameter | Type | Description |
|---|---|---|
| source | Connection | — |
| msg | MountedVPKsResponse | — |
Returns:
Task—public virtual void OnBecameHost(Sandbox.Connection previousHost)
| Parameter | Type | Description |
|---|---|---|
| previousHost | Connection | — |
Returns:
void—public virtual void OnConnected(Sandbox.Connection client)
| Parameter | Type | Description |
|---|---|---|
| client | Connection | — |
Returns:
void—public virtual void OnHostChanged(Sandbox.Connection previousHost, Sandbox.Connection newHost)
| Parameter | Type | Description |
|---|---|---|
| previousHost | Connection | — |
| newHost | Connection | — |
Returns:
void—public virtual void OnInitialize()
Returns:
void—public virtual void OnJoined(Sandbox.Connection client)
| Parameter | Type | Description |
|---|---|---|
| client | Connection | — |
Returns:
void—public virtual void OnLeave(Sandbox.Connection client)
| Parameter | Type | Description |
|---|---|---|
| client | Connection | — |
Returns:
void—public virtual System.IDisposable Push()
Returns:
IDisposable—public virtual System.Threading.Tasks.Task SetSnapshotAsync(Sandbox.Network.SnapshotMsg msg)
We have received a snapshot of the world.
| Parameter | Type | Description |
|---|---|---|
| msg | SnapshotMsg | — |
Returns:
Task—protected virtual void Tick()
Returns:
void—protected string WorkoutMapName()
Returns:
string—No results match this filter.