Show / Hide Table of Contents

Class BoundPeer

Inheritance
Object
Peer
BoundPeer
Implements
ISerializable
Inherited Members
Peer.PublicKey
Peer.Address
Peer.PublicIPAddress
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Net
Assembly: Libplanet.dll
Syntax
[Serializable]
public sealed class BoundPeer : Peer, ISerializable

Constructors

| Improve this Doc View Source

BoundPeer(Bencodex.Types.Dictionary)

Declaration
public BoundPeer(Bencodex.Types.Dictionary dictionary)
Parameters
Type Name Description
Bencodex.Types.Dictionary dictionary
| 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 Peer.

DnsEndPoint endPoint

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

Properties

| Improve this Doc View Source

EndPoint

The corresponding DnsEndPoint of this peer.

Declaration
[Pure]
public DnsEndPoint EndPoint { get; }
Property Value
Type Description
DnsEndPoint

Methods

| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
Overrides
Peer.GetObjectData(SerializationInfo, StreamingContext)
| 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

ToBencodex()

Declaration
public override Bencodex.Types.Dictionary ToBencodex()
Returns
Type Description
Bencodex.Types.Dictionary
Overrides
Peer.ToBencodex()
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Peer.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

Extension Methods

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