docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetRpcHeaderLength

    GetRpcHeaderLength(bool)

    The RPC "common header" format is 9 bytes:

    • Message Type: byte
    • LocalTime: int
    • RemoteTime: int

    And then, for each RPC, the header is:

    • RpcHash: [short|long] (based on DynamicAssemblyList)
    • Size: ushort
    • Payload : x bytes

    So for a single message we have:

    • 9 (common header) + 4 => 13 bytes (no DynamicAssemblyList)
    • 9 (common header) + 10 => 19 bytes (with DynamicAssemblyList)
    Declaration
    public static int GetRpcHeaderLength(bool dynamicAssemblyList)
    Parameters
    Type Name Description
    bool dynamicAssemblyList

    Whether or not your project is using DynamicAssemblyList.

    Returns
    Type Description
    int

    If DynamicAssemblyList, 19 bytes, otherwise 13 bytes.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)