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

Improve LAN discovery #586

Merged
merged 2 commits into from Oct 7, 2017
Merged

Conversation

Diadlo
Copy link

@Diadlo Diadlo commented Aug 27, 2017

Issue: If another tox instance started on the not default port, LAN
discovery will be failed.

Now tox will iterate though all possible ports to find another tox
instances.


This change is Reviewable

@Diadlo Diadlo force-pushed the improve_lan_discovery branch 3 times, most recently from ef835f5 to ff4f09b Compare August 27, 2017 17:14
@Diadlo
Copy link
Author

Diadlo commented Aug 28, 2017

This change, reques update the spec
Also, I thought about trying two ports: default and incremented (any suggestions?)

@im-grey
Copy link

im-grey commented Aug 30, 2017

This is great news.

@zoff99
Copy link

zoff99 commented Aug 30, 2017

@Diadlo can you please also add logging to that, so that if LAN discovery finds something this fact is logged

@Diadlo
Copy link
Author

Diadlo commented Aug 31, 2017

@zoff99 Because LAN discovery uses broadcast messages, I only can handle when someone found you, but not when you found someone

@zoff99
Copy link

zoff99 commented Sep 1, 2017

@Diadlo that sounds good. with logging i can actually try it on my LAN with 2 clients and see if it works.

because now there is no logging like that, and i think its not working on my LAN.
also could it be true that a LAN node has always less "priority" than a normal node, and then the internet route would be always preferred? (thats how it feels like in my LAN)

@zoff99
Copy link

zoff99 commented Sep 1, 2017

https://github.com/TokTok/spec/blob/master/spec.md#lan-discovery
"When enabled, toxcore sends these packets every 10 seconds to keep delays low"

does that mean with landiscovery "ON" packets will be sent every 10 seconds forever? or will this stop at some point?
(thinking about mobile devices again)

@zoff99
Copy link

zoff99 commented Sep 1, 2017

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@zoff99
Copy link

zoff99 commented Sep 1, 2017

does this only scan from "TOX_PORTRANGE_FROM 33445" to "TOX_PORTRANGE_TO 33545" ?

@zoff99
Copy link

zoff99 commented Sep 1, 2017

:lgtm_strong:


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@Diadlo
Copy link
Author

Diadlo commented Sep 1, 2017

@zoff99 Added logging

does this only scan from "TOX_PORTRANGE_FROM 33445" to "TOX_PORTRANGE_TO 33545" ?

Yes

I thought about trying two ports: default and incremented

What do you think about it?

@zoff99
Copy link

zoff99 commented Sep 2, 2017

@Diadlo what is "incremented" port ?

@Diadlo
Copy link
Author

Diadlo commented Sep 2, 2017

@zoff99

send_LANdiscovery(net_htons(TOX_PORT_DEFAULT), fr_c->dht);
for (uint16_t port = first; port < last; port++) {
    send_LANdiscovery(net_htons(port), fr_c->dht);
}

@Diadlo Diadlo force-pushed the improve_lan_discovery branch 2 times, most recently from ae8a6c4 to a274104 Compare September 14, 2017 07:17
@robinlinden
Copy link
Member

:lgtm_strong:


Reviewed 1 of 2 files at r1, 1 of 1 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Oct 3, 2017

Rebase (or checkbox).

Issue: If another tox instance started on the not default port, LAN
discovery will be failed.

Now tox will iterate though all possible ports to find another tox
instances.
@Diadlo
Copy link
Author

Diadlo commented Oct 3, 2017

@iphydf Done (both)

@robinlinden robinlinden added this to the v0.1.11 milestone Oct 6, 2017
@robinlinden robinlinden merged commit 1577c75 into TokTok:master Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants