docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RelayConnectionData

    This is the encrypted data that the Relay server uses for describing a connection. Used mainly in the connection establishing process (Binding).

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Networking.Transport.Relay
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public struct RelayConnectionData

    Fields

    Value

    The raw data of the Connection Data

    Declaration
    public byte* Value
    Field Value
    Type Description
    byte*

    k_Length

    The length in bytes of the Connection Data.

    Declaration
    public const int k_Length = 255
    Field Value
    Type Description
    int

    Methods

    FromByteArray(byte[])

    Convert a byte array to a RelayConnectionData

    Declaration
    public static RelayConnectionData FromByteArray(byte[] data)
    Parameters
    Type Name Description
    byte[] data

    Array to convert.

    Returns
    Type Description
    RelayConnectionData

    New RelayConnectionData.

    FromBytePointer(byte*, int)

    Converts a byte pointer to a RelayConnectionData.

    Declaration
    public static RelayConnectionData FromBytePointer(byte* dataPtr, int length)
    Parameters
    Type Name Description
    byte* dataPtr

    The pointer to the data of the Connection Data.

    int length

    The length of the data.

    Returns
    Type Description
    RelayConnectionData

    Returns a RelayConnectionData constructed from the provided data.

    Exceptions
    Type Condition
    ArgumentException

    Provided byte array length is invalid, must be but got .

    In This Article
    Back to top
    Copyright © 2025 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)