Class DhtEngine
Inheritance
System.Object
DhtEngine
Implements
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()
Assembly: MonoTorrent.dll
Syntax
public class DhtEngine : IDhtEngine, IDisposable
Constructors
DhtEngine(IDhtListener)
Declaration
public DhtEngine(IDhtListener listener)
Parameters
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
Methods
Add(BEncodedList)
Declaration
public void Add(BEncodedList nodes)
Parameters
Announce(InfoHash, Int32)
Declaration
public void Announce(InfoHash infoHash, int port)
Parameters
| Type |
Name |
Description |
| InfoHash |
infoHash |
|
| System.Int32 |
port |
|
Dispose()
Declaration
GetPeers(InfoHash)
Declaration
public void GetPeers(InfoHash infoHash)
Parameters
SaveNodesAsync()
Declaration
public Task<byte[]> SaveNodesAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Byte[]> |
|
SetListener(IDhtListener)
Declaration
public void SetListener(IDhtListener listener)
Parameters
StartAsync()
Declaration
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
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Events
PeersFound
Declaration
public event EventHandler<PeersFoundEventArgs> PeersFound
Event Type
StateChanged
Declaration
public event EventHandler StateChanged
Event Type
| Type |
Description |
| System.EventHandler |
|
Implements
System.IDisposable