Class Peer
A representation of peer node.
Assembly: Libplanet.dll
Syntax
public class Peer : ISerializable
Constructors
|
Improve this Doc
View Source
Peer(PublicKey, AppProtocolVersion)
Declaration
public Peer(PublicKey publicKey, AppProtocolVersion appProtocolVersion)
Parameters
|
Improve this Doc
View Source
Peer(SerializationInfo, StreamingContext)
Declaration
protected Peer(SerializationInfo info, StreamingContext context)
Parameters
Type |
Name |
Description |
SerializationInfo |
info |
|
StreamingContext |
context |
|
Properties
|
Improve this Doc
View Source
Address
The peer's address which is derived from
its PublicKey.
Declaration
public Address Address { get; }
Property Value
See Also
|
Improve this Doc
View Source
AppProtocolVersion
The corresponding application protocol version of this peer.
Declaration
public AppProtocolVersion AppProtocolVersion { get; }
Property Value
|
Improve this Doc
View Source
PublicIPAddress
Declaration
public IPAddress PublicIPAddress { get; }
Property Value
Type |
Description |
IPAddress |
|
|
Improve this Doc
View Source
PublicKey
Declaration
public PublicKey PublicKey { get; }
Property Value
Methods
|
Improve this Doc
View Source
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type |
Name |
Description |
SerializationInfo |
info |
|
StreamingContext |
context |
|
|
Improve this Doc
View Source
IsCompatibleWith(AppProtocolVersion, IEnumerable<PublicKey>, DifferentAppProtocolVersionEncountered)
Determines if the peer is compatible with the given criteria.
Declaration
public bool IsCompatibleWith(AppProtocolVersion localVersion, IEnumerable<PublicKey> trustedSigners = null, DifferentAppProtocolVersionEncountered recognizer = null)
Parameters
Type |
Name |
Description |
AppProtocolVersion |
localVersion |
The version of the currently running application.
|
IEnumerable<PublicKey> |
trustedSigners |
A list of signers to trust. An empty list means
to trust no one, so that this method always returns false . Conversely,
null means to trust anyone. Be aware of the difference of those two.
|
DifferentAppProtocolVersionEncountered |
recognizer |
A callback to determine an encountered peer's
AppProtocolVersion is compatible with the currently running
application, in the case of the peer's version signature is trustworthy but its
version number is not the same.
|
Returns
Type |
Description |
Boolean |
true if the peer is compatible with the given criteria.
Otherwise false .
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Operators
|
Improve this Doc
View Source
Equality(Peer, Peer)
Declaration
public static bool operator ==(Peer left, Peer right)
Parameters
Type |
Name |
Description |
Peer |
left |
|
Peer |
right |
|
Returns
|
Improve this Doc
View Source
Inequality(Peer, Peer)
Declaration
public static bool operator !=(Peer left, Peer right)
Parameters
Type |
Name |
Description |
Peer |
left |
|
Peer |
right |
|
Returns
See Also