Show / Hide Table of Contents

Class DhtEngine

Inheritance
System.Object
DhtEngine
Implements
IDhtEngine
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MonoTorrent.Dht
Assembly: MonoTorrent.dll
Syntax
public class DhtEngine : IDhtEngine, IDisposable

Constructors

DhtEngine(IDhtListener)

Declaration
public DhtEngine(IDhtListener listener)
Parameters
Type Name Description
IDhtListener listener

DhtEngine(IPEndPoint)

Creates a new DhtEngine which listens for connections on the given endpoint

Declaration
public DhtEngine(IPEndPoint listenerEndpoint)
Parameters
Type Name Description
System.Net.IPEndPoint listenerEndpoint

The IPAddresss/port which the engine should listen on

Properties

Disposed

Declaration
public bool Disposed { get; }
Property Value
Type Description
System.Boolean

State

Declaration
public DhtState State { get; }
Property Value
Type Description
DhtState

Methods

Add(BEncodedList)

Declaration
public void Add(BEncodedList nodes)
Parameters
Type Name Description
BEncodedList nodes

Announce(InfoHash, Int32)

Declaration
public void Announce(InfoHash infoHash, int port)
Parameters
Type Name Description
InfoHash infoHash
System.Int32 port

Dispose()

Declaration
public void Dispose()

GetPeers(InfoHash)

Declaration
public void GetPeers(InfoHash infoHash)
Parameters
Type Name Description
InfoHash infoHash

SaveNodesAsync()

Declaration
public Task<byte[]> SaveNodesAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.Byte[]>

SetListener(IDhtListener)

Declaration
public void SetListener(IDhtListener listener)
Parameters
Type Name Description
IDhtListener listener

StartAsync()

Declaration
public Task StartAsync()
Returns
Type Description
System.Threading.Tasks.Task

StartAsync(Byte[])

Declaration
public Task StartAsync(byte[] initialNodes)
Parameters
Type Name Description
System.Byte[] initialNodes
Returns
Type Description
System.Threading.Tasks.Task

StopAsync()

Declaration
public Task StopAsync()
Returns
Type Description
System.Threading.Tasks.Task

Events

PeersFound

Declaration
public event EventHandler<PeersFoundEventArgs> PeersFound
Event Type
Type Description
System.EventHandler<PeersFoundEventArgs>

StateChanged

Declaration
public event EventHandler StateChanged
Event Type
Type Description
System.EventHandler

Implements

IDhtEngine
System.IDisposable
In This Article
Back to top Generated by DocFX