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

Questions about the WebTorrent protocol #1572

Closed
jech opened this issue Jan 22, 2019 · 3 comments
Closed

Questions about the WebTorrent protocol #1572

jech opened this issue Jan 22, 2019 · 3 comments

Comments

@jech
Copy link

@jech jech commented Jan 22, 2019

  1. What is the maximum SCTP chunk size? WebTorrent appears to be sending each BitTorrent message in two chunks, but I've been sending it fixed-size chunks of 4kB and it groks them. Knowing the maximum chunk size that WebTorrent will send would be useful for sizing buffers.

  2. How do I reject an offer from the tracker? Do I just ignore unwanted offers? Right now, I'm simply closing the WebSocket connection when I've got enough peers, is that the right thing to do?

  3. If I want to generate new offers, am I allowed to send a new announce before the interval expires? It seems inefficient to generate offers before they are needed, with all the ICE traffic they cause.

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Apr 22, 2019

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 Apr 22, 2019
@stale stale bot closed this Apr 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 28, 2019
@webtorrent webtorrent unlocked this conversation Aug 23, 2019
@feross feross reopened this Aug 23, 2019
@stale stale bot removed the stale label Aug 23, 2019
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Aug 23, 2019

What is the maximum SCTP chunk size?

We don't send one specific chunk size, so I would not rely on receiving any specific size. Node.js streams by default have an internal chunk size of 16kb, I believe. But that doesn't mean that our calls to send() will necessary always be 16kb.

How do I reject an offer from the tracker? Do I just ignore unwanted offers? Right now, I'm simply closing the WebSocket connection when I've got enough peers, is that the right thing to do?

It's fine to ignore unwanted offers. The remote peer will close it's end of the connection after a timeout.

I'm simply closing the WebSocket connection when I've got enough peers, is that the right thing to do?

This is totally fine to do.

If I want to generate new offers, am I allowed to send a new announce before the interval expires? It seems inefficient to generate offers before they are needed, with all the ICE traffic they cause.

You can announce before the interval expires, but it's possible that the tracker server will ignore you / ban you temporarily (it's up to the tracker) if you contact them too frequently.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Aug 23, 2019

I'm closing this issue since there's no bug to fix here, but feel free to continue discussion!

@feross feross closed this Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

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