Closed pbpraveen1988 closed 8 years ago
Showing peers and downloading a file is easy:
var client = new IpfsClient();
// Gives you an ICollection of multiaddresses you're connected to
var peers = await client.Swarm.Peers();
Stream outputStream = await client.Cat("Qm...");
// Write outputStream to a byte[] or file.
To show download percentage you can inject the IpfsClient
with your own HttpClient
which has your own Handler to show download completion as shown here
HttpClient httpClient; // httpClient with our handler.
var client = new IpfsClient(new Uri("http://127.0.0.1:5001"), httpClient);
Hello @TrekDev ,
Thank You for the solution , one question , var peers = await client.Swarm.Peers();
will search for particular file peer or peer is related to something for all files
I know this is silly but i am new to IPFS and distributing systems or network.
Thank You
@pbpraveen1988 I don't understand the question.
@pbpraveen1988 it will list all peers with opnen connections.
It does not allow you to specifically list peers hosting a certain file.
Hello @TrekDev ,
I like your library and i am using it and i want to download the file using hash key and also want to show the peers and downloading progress in %, can you guide me on this issue.
Thank You