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

Provide ipv6 address support #18

Merged
merged 2 commits into from
Apr 7, 2016
Merged

Conversation

prabodh1194
Copy link
Contributor

For class kademlia.network.Server:
change
listen(port)
to
listen(port, interface=None)
interface="::" can be provided to enable ipv6 support.

This is in accordance with as given in twisted documentation

For class kademlia.network.Server:
change listen(port) ---> listen(port, interface=None).
interface="::" can be provided to enable ipv6 support.
@@ -40,15 +40,20 @@ def __init__(self, ksize=20, alpha=3, id=None, storage=None):
self.protocol = KademliaProtocol(self.node, self.storage, ksize)
self.refreshLoop = LoopingCall(self.refreshTable).start(3600)

def listen(self, port):
def listen(self, port, interface=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use interface='' as the default, then line 51 can just be return reactor.listenUDP(port, self.protocol, interface=interface) and you won't need any of the other lines.

Changed default interface to ""
@prabodh1194
Copy link
Contributor Author

changed interface=None to interface="" in listen().
Thank you.

@bmuller bmuller merged commit 7b29c50 into bmuller:master Apr 7, 2016
@bmuller
Copy link
Owner

bmuller commented Apr 7, 2016

Version bumped as well on pypi.

@prabodh1194
Copy link
Contributor Author

Thanks.

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.

2 participants