Méthode | Description | |
---|---|---|
Configure ( string udpPort = "-1", string kademliaPort = "-1" ) : void |
PeerLibrary.IPeer
|
|
ConnectToStream ( ) : Stream |
PeerLibrary.IPeer
|
|
Dispose ( ) : void |
Method created to implement the IDisposable interface and used to close all service hosts already running.
|
|
GetAllTracks ( ) : IList |
Method used to get all stored tracks
|
|
GetFlow ( string RID, int begin, long length, float>.Dictionary |
PeerLibrary.IPeer
|
|
GetFlow ( string RID, int begin, long length, float>.Dictionary |
Overload of the previous method with an extern stream passed.
|
|
Peer ( bool single = false, string btpNode = "" ) : System |
Peer Constructor. It initialize configuration according to the options passed, initialize the local stream, creates the databases and resolves the IP address using Dns class.
|
|
RestartFlow ( ) : void |
PeerLibrary.IPeer
|
|
RunLayers ( bool withoutInterface = false ) : void |
Method used to run layers (kademlia, transport, interface). Each layer is ran in a separate thread in order to allow to register the thread hosting the service with a referrer thread id (in global threadpool) that is different from the mai thread. The method will wait each layer to have completely finished booting before passing to another layer.
|
|
SearchFor ( string queryString ) : IList |
PeerLibrary.IPeer
|
|
StopFlow ( ) : void |
PeerLibrary.IPeer
|
|
StoreFile ( string filename ) : bool |
PeerLibrary.IPeer
|
Méthode | Description | |
---|---|---|
calculateAddresses ( ) : void |
Method used to construct all local addresses according to configuration.
|
|
runInterfaceLayer ( System.ServiceModel.ServiceHost &svcHost ) : void |
Method (usually runned like a thread) that privately hosts the interface service.
|
|
runKademliaLayer ( bool single, string btpNode, System.ServiceModel.ServiceHost &svcHost ) : void |
Method that runs the kademlia layer
|
|
runTransportLayer ( System.ServiceModel.ServiceHost &svcHost ) : void |
Method that runs the transport layer
|
public Configure ( string udpPort = "-1", string kademliaPort = "-1" ) : void | ||
udpPort | string | String containing the value of the udpPort |
kademliaPort | string | String containig the value of the kademliaPort |
Résultat | void |
public GetFlow ( string RID, int begin, long length, float>.Dictionary |
||
RID | string | The resource identifier |
begin | int | The begin point from the head of a file to start download |
length | long | The total length of file |
nodes | float>.Dictionary | Nodes with associated score that are used to download a file from the network |
Résultat | void |
public GetFlow ( string RID, int begin, long length, float>.Dictionary |
||
RID | string | The resource identifier |
begin | int | The begin point from the head of a file to start download |
length | long | The total length of file |
nodes | float>.Dictionary | Nodes with associated score that are used to download a file from the network |
stream | Stream | The stream to use |
Résultat | void |
public Peer ( bool single = false, string btpNode = "" ) : System | ||
single | bool | Indicates if the peer have to run kademlia layer in single bootstrap |
btpNode | string | Address of the suggested bootstrap node. |
Résultat | System |
public RunLayers ( bool withoutInterface = false ) : void | ||
withoutInterface | bool | indicates whether to start or not the peer interface layer. |
Résultat | void |
public SearchFor ( string queryString ) : IList |
||
queryString | string | the querystring used to search |
Résultat | IList |
public StoreFile ( string filename ) : bool | ||
filename | string | filename of the file to download |
Résultat | bool |