docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetConnectionData

    SetConnectionData(string, ushort, string)

    Sets IP and Port information. This will be ignored if using the Unity Relay and you should call SetRelayServerData(string, ushort, byte[], byte[], byte[], byte[], bool)

    Declaration
    public void SetConnectionData(string ipv4Address, ushort port, string listenAddress = null)
    Parameters
    Type Name Description
    string ipv4Address

    The remote IP address (despite the name, can be an IPv6 address)

    ushort port

    The remote port

    string listenAddress

    The local listen address

    SetConnectionData(NetworkEndPoint, NetworkEndPoint)

    Sets IP and Port information. This will be ignored if using the Unity Relay and you should call SetRelayServerData(string, ushort, byte[], byte[], byte[], byte[], bool)

    Declaration
    public void SetConnectionData(NetworkEndPoint endPoint, NetworkEndPoint listenEndPoint = default)
    Parameters
    Type Name Description
    NetworkEndPoint endPoint

    The remote end point

    NetworkEndPoint listenEndPoint

    The local listen endpoint

    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)