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
Add UDP Broadcasts #10
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keks already did a review but maybe you want to have another look |
tested this by hand and it's working. This only implements sending them, not listening so this depends on peers connecting back. ps: also found ssbc/ssb-server#640 which might give an idea what to look out for |
Advertise the scuttlebutt service to the local network. Still needed: - Tests - Documentation - IPv6 support
Use the constant 'DefaultPort' to specify the default ScuttleButt to improve legibility.
just more of my style tbh. * some more error comments * actualt multiaddr formatting case * use DefaultPort more * add send & receive test * multiserver parser * break import cycle by moving node to it's own package * notify for incoming adverts * go-sbot enable flag * only connect to peers which aren't connected already
IPv6 addresses should be defined in brackets when including port numbers.
Expect the port to be specified entirely by the received Net Address.
Emit local network UDP advertisements on all local addresses when an unspecified address such as '0.0.0.0' is given.
cryptix
force-pushed
the
add/udp-broadcast
branch
from
April 30, 2019 17:18
e17f61a
to
3782c8a
Compare
Add an integration test for the linux network stack using network namespaces. Test against a small set of IPv4 subnets, and IPv6, and confirm the received advertisement. For the test to work, changes to the SUDO file are suggested within the integration test file. Include, but comment out, a breaking test which requires fixing.
Properly handle DefaultPort as an int. Fixes: 88e6c4
I think _node_ is a confusing enough term as it is in p2p stuff. additionally so since the ref implementation of ssb is in nodejs. move test code around and use discoverer: the defered cleanups (to remove the netns and bridge) needs manual intervention when a test fails (name exists on next run) so i moved the remove before the create to just wipe the previous run. also: split advertiser' listen portion into discoverer on the multi-network test code: i turned the cmd.Run of the sending into returning the cmd. i start and wait it in a goroutine and sync it with the receive this way there is only the sleep in TestSendAdvertisement and it's network is not killed by the next test case before it's done.
cryptix
force-pushed
the
add/udp-broadcast
branch
from
May 21, 2019 16:08
14f2ea4
to
2f0e0ff
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes the sbot send the advertisments out to local LAN to get connections.