docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetRelayServerData

    SetRelayServerData(string, ushort, byte[], byte[], byte[], byte[], bool)

    Set the relay server data for the server.

    Declaration
    public void SetRelayServerData(string ipv4Address, ushort port, byte[] allocationIdBytes, byte[] keyBytes, byte[] connectionDataBytes, byte[] hostConnectionDataBytes = null, bool isSecure = false)
    Parameters
    Type Name Description
    string ipv4Address

    IP address or hostname of the relay server.

    ushort port

    UDP port of the relay server.

    byte[] allocationIdBytes

    Allocation ID as a byte array.

    byte[] keyBytes

    Allocation key as a byte array.

    byte[] connectionDataBytes

    Connection data as a byte array.

    byte[] hostConnectionDataBytes

    The HostConnectionData as a byte array.

    bool isSecure

    Whether the connection is secure (uses DTLS).

    SetRelayServerData(RelayServerData)

    Set the relay server data (using the lower-level Unity Transport data structure).

    Declaration
    public void SetRelayServerData(RelayServerData serverData)
    Parameters
    Type Name Description
    RelayServerData serverData

    Data for the Relay server to use.

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