docs.unity.cn
    Show / Hide Table of Contents

    Struct UnityTransport.ConnectionAddressData

    Structure to store the address to connect to

    Namespace: Unity.Netcode.Transports.UTP
    Syntax
    [Serializable]
    public struct ConnectionAddressData

    Fields

    Address

    IP address of the server (address to which clients will connect to).

    Declaration
    [Tooltip("IP address of the server (address to which clients will connect to).")]
    [SerializeField]
    public string Address
    Field Value
    Type Description
    String

    Port

    UDP port of the server.

    Declaration
    [Tooltip("UDP port of the server.")]
    [SerializeField]
    public ushort Port
    Field Value
    Type Description
    UInt16

    ServerListenAddress

    IP address the server will listen on. If not provided, will use localhost.

    Declaration
    [Tooltip("IP address the server will listen on. If not provided, will use localhost.")]
    [SerializeField]
    public string ServerListenAddress
    Field Value
    Type Description
    String

    Properties

    IsIpv6

    Declaration
    public readonly bool IsIpv6 { get; }
    Property Value
    Type Description
    Boolean

    ListenEndPoint

    Endpoint (IP address and port) server will listen/bind on.

    Declaration
    public readonly NetworkEndPoint ListenEndPoint { get; }
    Property Value
    Type Description
    NetworkEndPoint

    ServerEndPoint

    Endpoint (IP address and port) clients will connect to.

    Declaration
    public readonly NetworkEndPoint ServerEndPoint { get; }
    Property Value
    Type Description
    NetworkEndPoint
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on Friday, April 21, 2023
    Terms of use