Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handshake before downloading file #1259

Closed
heroldsh opened this issue Jan 7, 2018 · 2 comments
Closed

Handshake before downloading file #1259

heroldsh opened this issue Jan 7, 2018 · 2 comments
Labels

Comments

@heroldsh
Copy link

@heroldsh heroldsh commented Jan 7, 2018

What version of WebTorrent?
1.11.0 (0.98.20)

What operating system and Node.js version?
ubuntu 16.04 - v8.9.4

I didn't find a Q&A forum so I'll ask it here, sorry if it's not the place...

I'm trying to implement kind of handshake with one peer (the closest between all peer available) before downloading the file. I looked at the source code and tried to figure out where do I get the IP address and the port of the one I'm going to download from and where the one I'm going to download from know that I'm download from him.

I'll give an example for what I want, let's say I'm looking for torrent with torrentId which Node B has, I do client.add(torrentId, opts, func...) and before Node B gives me the file he asks me 'You sure you want torrentId?` and only if I'll say yes I'll start downloading the file from him.

Does someone know where should I'll look for?
Thanks and have a great day!

@Robien

This comment has been minimized.

Copy link

@Robien Robien commented Jan 31, 2018

I am just passing and I saw this question...
Have you looked at https://github.com/webtorrent/webtorrent/blob/master/docs/api.md#torrentonwire-function-wire- ?

You can do a custom extension like shown here https://github.com/webtorrent/bittorrent-protocol#extension-api

you can even look at my very (very) simple example here https://github.com/Robien/eth_reward/blob/master/index.js where I do an extension to exchange ethereum address between peers

hope it helps

@stale

This comment has been minimized.

Copy link

@stale stale bot commented May 9, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label May 9, 2018
@stale stale bot closed this May 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.