Struct NetworkStreamReceiveSystem
The NetworkStreamReceiveSystem is one of the most important system of the Netcode package and its fundamental job is to manage all the NetworkStreamConnection life-cycles (creation, update, destruction), and receiving all the NetworkStreamProtocol message types. It is responsible also responsible for:
- creating the NetworkStreamDriver singleton (see also NetworkDriverStore and NetworkDriver).
- handling the driver migration (see DriverMigrationSystem and MigrationTicket).
- listening and accepting incoming connections (server).
- exchanging the NetworkProtocolVersion during the initial handshake.
- updating the ConnectionState state component if present.
Implements
ISystem
Inherited Members
Namespace: Unity.Netcode
Assembly: Unity.NetCode.dll
Syntax
[BurstCompile]
[MovedFrom(true, "Unity.NetCode", null, null)]
public struct NetworkStreamReceiveSystem : ISystem
Properties
DriverConstructor
Assign your INetworkStreamDriverConstructor to customize the NetworkDriver construction.
Declaration
public static INetworkStreamDriverConstructor DriverConstructor { get; set; }
Property Value
| Type | Description |
|---|---|
| INetworkStreamDriverConstructor |
Methods
OnCreate(ref SystemState)
Declaration
public void OnCreate(ref SystemState state)
Parameters
| Type | Name | Description |
|---|---|---|
| SystemState | state |
OnDestroy(ref SystemState)
Declaration
public void OnDestroy(ref SystemState state)
Parameters
| Type | Name | Description |
|---|---|---|
| SystemState | state |
OnUpdate(ref SystemState)
Declaration
[BurstCompile]
public void OnUpdate(ref SystemState state)
Parameters
| Type | Name | Description |
|---|---|---|
| SystemState | state |
Implements
ISystem