Class PeerInfoMessage | Multiplayer HLAPI | 1.0.8
docs.unity.cn
    Show / Hide Table of Contents

    Class PeerInfoMessage

    Information about another participant in the same network game.

    This information is cached by clients and used during host-migration.

    Inheritance
    Object
    MessageBase
    PeerInfoMessage
    Namespace: UnityEngine.Networking.NetworkSystem
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class PeerInfoMessage : MessageBase

    Fields

    address

    The IP address of the peer.

    Declaration
    public string address
    Field Value
    Type Description
    String

    connectionId

    The id of the NetworkConnection associated with the peer.

    Declaration
    public int connectionId
    Field Value
    Type Description
    Int32

    isHost

    True if this peer is the host of the network game.

    Declaration
    public bool isHost
    Field Value
    Type Description
    Boolean

    isYou

    True if the peer if the same as the current client.

    Declaration
    public bool isYou
    Field Value
    Type Description
    Boolean

    playerIds

    The players for this peer.

    Declaration
    public PeerInfoPlayer[] playerIds
    Field Value
    Type Description
    PeerInfoPlayer[]

    port

    The network port being used by the peer.

    Declaration
    public int port
    Field Value
    Type Description
    Int32

    Methods

    Deserialize(NetworkReader)

    Declaration
    public override void Deserialize(NetworkReader reader)
    Parameters
    Type Name Description
    NetworkReader reader
    Overrides
    MessageBase.Deserialize(NetworkReader)

    Serialize(NetworkWriter)

    Declaration
    public override void Serialize(NetworkWriter writer)
    Parameters
    Type Name Description
    NetworkWriter writer
    Overrides
    MessageBase.Serialize(NetworkWriter)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    In This Article
    • Fields
      • address
      • connectionId
      • isHost
      • isYou
      • playerIds
      • port
    • Methods
      • Deserialize(NetworkReader)
      • Serialize(NetworkWriter)
      • ToString()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 15 December 2020