docs.unity3d.com
    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.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Networking.Transport.Relay
    Syntax
    public struct RelayConnectionData

    Fields

    k_Length

    The length in bytes of the Connection Data.

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

    Value

    The raw data of the Connection Data

    Declaration
    public byte *Value
    Field Value
    Type Description
    Byte*

    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*, Int32)

    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.

    Int32 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 {k_Length} but got {length}.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023