Class Peer
A representation of peer node.
Implements
Inherited Members
Namespace: Libplanet.Net
Assembly: Libplanet.dll
Syntax
[Serializable]
[Equals]
public class Peer : ISerializable
Constructors
| Improve this Doc View SourcePeer(PublicKey, DnsEndPoint)
Initializes a new instance of the Peer class with omitting AppProtocolVersion.
Declaration
public Peer(PublicKey publicKey, DnsEndPoint endPoint)
Parameters
Type | Name | Description |
---|---|---|
PublicKey | publicKey | |
DnsEndPoint | endPoint | A DnsEndPoint consisting of the host and port of the Peer. |
Peer(PublicKey, DnsEndPoint, Nullable<Int32>)
Initializes a new instance of the Peer class.
Declaration
public Peer(PublicKey publicKey, DnsEndPoint endPoint, int? appProtocolVersion)
Parameters
Type | Name | Description |
---|---|---|
PublicKey | publicKey | |
DnsEndPoint | endPoint | A DnsEndPoint consisting of the host and port of the Peer. |
Nullable<Int32> | appProtocolVersion | An application protocol version that the Peer is using. |
Peer(SerializationInfo, StreamingContext)
Declaration
protected Peer(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
Properties
| Improve this Doc View SourceAddress
The peer's address which is derived from its PublicKey.
Declaration
[IgnoreDuringEquals]
[Pure]
public Address Address { get; }
Property Value
Type | Description |
---|---|
Address |
See Also
| Improve this Doc View SourceAppProtocolVersion
The corresponding application protocol version of this peer.
Declaration
[IgnoreDuringEquals]
[Pure]
public int? AppProtocolVersion { get; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
See Also
| Improve this Doc View SourceEndPoint
The corresponding DnsEndPoint of this peer.
Declaration
[Pure]
public DnsEndPoint EndPoint { get; }
Property Value
Type | Description |
---|---|
DnsEndPoint |
PublicKey
The corresponding PublicKey of this peer.
Declaration
[Pure]
public PublicKey PublicKey { get; }
Property Value
Type | Description |
---|---|
PublicKey |
Methods
| Improve this Doc View SourceGetObjectData(SerializationInfo, StreamingContext)
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Implements
See Also
Swarm<T>