Struct NetworkStreamConnection
A connection is represented by an entity having a NetworkStreamConnection.
The component hold a reference to the underlying transport Unity.
- Outgoing
Client connections also have a Incoming
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct NetworkStreamConnection : ICleanupComponentData, IComponentData, IQueryTypeParameter
Remarks
Never destroy this entity yourself. You'll receive an error if you attempt to do so.
Fields
CurrentState
Cache of the last state pulled from the driver.
Declaration
public ConnectionState.State CurrentState
Field Value
Type | Description |
---|---|
Connection |
Remarks
May be stale, as only refreshed once per Simulation
DriverId
The driver identifier that create the connection. Can be used to retrieve the Unity.
Declaration
public int DriverId
Field Value
Type | Description |
---|---|
int |
ProtocolVersionReceived
Flag used to mark if the connection has exchanged the protocol version. 1 indicates that the remote version protocol has been received AND accepted (i.e. it's valid)!
Declaration
public int ProtocolVersionReceived
Field Value
Type | Description |
---|---|
int |
Value
The underlying transport Unity.
Declaration
public NetworkConnection Value
Field Value
Type | Description |
---|---|
Network |