Show / Hide Table of Contents

Class BoundPeer

Inheritance
Object
BoundPeer
Implements
ISerializable
IEquatable<BoundPeer>
Bencodex.IBencodable
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Net
Assembly: Libplanet.Net.dll
Syntax
[Serializable]
public sealed class BoundPeer : ISerializable, IEquatable<BoundPeer>, IBencodable

Constructors

| Improve this Doc View Source

BoundPeer(IValue)

Declaration
public BoundPeer(IValue bencoded)
Parameters
Type Name Description
Bencodex.Types.IValue bencoded
| Improve this Doc View Source

BoundPeer(PublicKey, DnsEndPoint)

Initializes a new instance of the BoundPeer class.

Declaration
public BoundPeer(PublicKey publicKey, DnsEndPoint endPoint)
Parameters
Type Name Description
PublicKey publicKey

A PublicKey of the BoundPeer.

DnsEndPoint endPoint

A DnsEndPoint consisting of the host and port of the BoundPeer.

Properties

| Improve this Doc View Source

Address

The peer's address which is derived from its PublicKey.

Declaration
[LogAsScalar(false)]
[Pure]
public Address Address { get; }
Property Value
Type Description
Address
See Also
PublicKey
| Improve this Doc View Source

Bencoded

Declaration
[Pure]
public IValue Bencoded { get; }
Property Value
Type Description
Bencodex.Types.IValue
| Improve this Doc View Source

EndPoint

The corresponding DnsEndPoint of this peer.

Declaration
[LogAsScalar(false)]
[Pure]
public DnsEndPoint EndPoint { get; }
Property Value
Type Description
DnsEndPoint
| Improve this Doc View Source

PeerString

Declaration
public string PeerString { get; }
Property Value
Type Description
String
| Improve this Doc View Source

PublicIPAddress

Declaration
[LogAsScalar(false)]
[Pure]
public IPAddress PublicIPAddress { get; }
Property Value
Type Description
IPAddress
| Improve this Doc View Source

PublicKey

The corresponding PublicKey of this peer.

Declaration
[LogAsScalar(false)]
[Pure]
public PublicKey PublicKey { get; }
Property Value
Type Description
PublicKey

Methods

| Improve this Doc View Source

Equals(BoundPeer)

Declaration
public bool Equals(BoundPeer other)
Parameters
Type Name Description
BoundPeer other
Returns
Type Description
Boolean
| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
| Improve this Doc View Source

ParsePeer(String)

Initializes a new instance of the BoundPeer class from comma-separated string.

Declaration
public static BoundPeer ParsePeer(string peerInfo)
Parameters
Type Name Description
String peerInfo

A comma-separated string have format {pubkey},{host},{port}.

Returns
Type Description
BoundPeer

A BoundPeer from given data.

Exceptions
Type Condition
ArgumentException

Thrown when the given peerInfo is invalid.

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Operators

| Improve this Doc View Source

Equality(BoundPeer, BoundPeer)

Declaration
public static bool operator ==(BoundPeer left, BoundPeer right)
Parameters
Type Name Description
BoundPeer left
BoundPeer right
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(BoundPeer, BoundPeer)

Declaration
public static bool operator !=(BoundPeer left, BoundPeer right)
Parameters
Type Name Description
BoundPeer left
BoundPeer right
Returns
Type Description
Boolean

Implements

System.Runtime.Serialization.ISerializable
System.IEquatable<T>
Bencodex.IBencodable

Extension Methods

BoundPeerExtensions.QueryAppProtocolVersionNetMQ(BoundPeer, Nullable<TimeSpan>)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium