docs.unity.cn
    Show / Hide Table of Contents

    Struct NetworkStreamConnection

    A connection is represented by an entity having a NetworkStreamConnection. The component hold a reference to the underlying transport NetworkConnection and the NetworkDriver that created it. All connections share a common set of components:

    - NetworkId

    - IncomingRpcDataStreamBuffer

    - OutgoingCommandDataStreamBuffer

    - OutgoingRpcDataStreamBuffer

    - PrespawnSectionAck

    - CommandTarget

    Client connections also have a IncomingSnapshotDataStreamBuffer to handle server ghost snapshots.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct NetworkStreamConnection : IComponentData, IQueryTypeParameter

    Fields

    DriverId

    The driver identifier that create the connection. Can be used to retrieve the NetworkDriver or the NetworkDriverStore.NetworkDriverInstance from the NetworkDriverStore.

    Declaration
    public int DriverId
    Field Value
    Type Description
    Int32

    ProtocolVersionReceived

    Flag used to mark if the connection has exchanged the protocol version. 1 indicates that the remote version protocol has been received.

    Declaration
    public int ProtocolVersionReceived
    Field Value
    Type Description
    Int32

    Value

    The underlyng transport NetworkConnection

    Declaration
    public NetworkConnection Value
    Field Value
    Type Description
    NetworkConnection
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023