Class PeerInfoMessage
Information about another participant in the same network game.
This information is cached by clients and used during host-migration.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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 |
---|---|
System.String |
connectionId
The id of the NetworkConnection associated with the peer.
Declaration
public int connectionId
Field Value
Type | Description |
---|---|
System.Int32 |
isHost
True if this peer is the host of the network game.
Declaration
public bool isHost
Field Value
Type | Description |
---|---|
System.Boolean |
isYou
True if the peer if the same as the current client.
Declaration
public bool isYou
Field Value
Type | Description |
---|---|
System.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 |
---|---|
System.Int32 |
Methods
Deserialize(NetworkReader)
Declaration
public override void Deserialize(NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
NetworkReader | reader |
Overrides
Serialize(NetworkWriter)
Declaration
public override void Serialize(NetworkWriter writer)
Parameters
Type | Name | Description |
---|---|---|
NetworkWriter | writer |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()