Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upPeer connect too long about 10seconds #1087
Comments
This comment has been minimized.
This comment has been minimized.
|
I suspect it might because of this, https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Protocols Could you add timer on tracker as well, so we would know if tracker could be the cause |
This comment has been minimized.
This comment has been minimized.
|
There's nothing WebTorrent as a library can do to speed webrtc connections. The tracking itself is very fast. Offers & Answers are pretty much instant and should only take the latency of between the peers and the tracker server, the processing time is negligible. |
This comment has been minimized.
This comment has been minimized.
|
Unfortunately, WebRTC connections can sometimes take a bit of time to set up, as @DiegoRBaquero said. |
This comment has been minimized.
This comment has been minimized.
|
But actually it seems very fast when i open https://webtorrent.io/ |
This comment has been minimized.
This comment has been minimized.
|
It's a webseeded torrent so a server is first reached, Instantly pretty much, and pieces are downloaded through http.
It might interest you: https://hackernoon.com/how-to-create-a-swarm-cdn-for-free-with-webtorrent-bfa09d193f71
… On Apr 6, 2017, at 10:51 PM, bluefchen ***@***.***> wrote:
But actually it seems very fast when i open https://webtorrent.io/
It can establish connection with other peers with almost a negligible time.
How it is ***@***.*** @DiegoRBaquero @kocoten1992
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This comment has been minimized.
This comment has been minimized.
|
thank you for your reply!@DiegoRBaquero @feross I try to seed file on webseed as the url https://hackernoon.com/how-to-create-a-swarm-cdn-for-free-with-webtorrent-bfa09d193f71 proposal , but it can not establish connection . I still think about How to reduce the time to establish a connection , and where can I reduce the time to build a connection? Is it webtorrent-desktop`s question? |
This comment has been minimized.
This comment has been minimized.
|
Hi, can you please tell me what did you do to make it establish connection with other peers so fast in https://webtorrent.io/ on sintel.torrent @feross |
This comment has been minimized.
This comment has been minimized.
|
@bluefchen , it use webseed
focus on the last two, ws and xs, if you want to use webseed, combine it with xs (for case you are the only peer) |
This comment has been minimized.
This comment has been minimized.
|
@kocoten1992 thank you for your reply!!! Yup! It indeed has a ws and xs strings in the end And i have try it ! when i delete the ws and xs strings
the whole connection time will become too long about 14s and when i add the ws and xs strings. it will be fast! so How can i add this string to my magnetic link? @feross |
This comment has been minimized.
This comment has been minimized.
|
You need to generate a torrent file and have a webseed for your file.
… On Apr 25, 2017, at 8:31 AM, bluefchen ***@***.***> wrote:
@kocoten1992 thank you for your reply!!!
Yup! It indeed has a ws and xs strings in the end
and the magnetic link generated by webtorrent-desktop doesn`t have
And i have try it ! when i delete the ws and xs strings &ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent
var torrentId = 'magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com''
the whole connection time will become too long about 14s
and when i add the ws and xs strings.
it will be fast!
so How can i add this string to my magnetic link? @feross
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|

What version of WebTorrent?
0.98.13
What operating system and Node.js version?
v7.7.4
What browser and version? (if using WebTorrent in the browser)
Chrome 57.0.2987.98
What did you expect to happen?
Cut connection time
What actually happened?
I record the connection time , it seems too long. about 9s.
So I dont where the time go away.
Here is my code
The above process cost too much times.