Skip to content

Added IPV6 support#2

Open
geir54 wants to merge 1 commit intoisaaczafuta:masterfrom
geir54:master
Open

Added IPV6 support#2
geir54 wants to merge 1 commit intoisaaczafuta:masterfrom
geir54:master

Conversation

@geir54
Copy link
Copy Markdown

@geir54 geir54 commented Aug 29, 2013

Needed IPV6 for some tests so did an update

Copy link
Copy Markdown

@zougloub zougloub left a comment

Choose a reason for hiding this comment

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

I was just looking at the repo code, and thought I'd comment on the PR.

pass
client_host, client_port = self.client_address
client_host = self.client_address[0]
client_port = self.client_address[1]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

useless change?

class DHTServer(SocketServer.ThreadingMixIn, SocketServer.UDPServer):
def __init__(self, host_address, handler_cls):
def __init__(self, host_address, handler_cls, ipv6):
self.address_family = socket.AF_INET6 if ipv6 else socket.AF_INET
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent indentation


class DHTServer(SocketServer.ThreadingMixIn, SocketServer.UDPServer):
def __init__(self, host_address, handler_cls):
def __init__(self, host_address, handler_cls, ipv6):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To keep the API functional, should use a default parameter.

def __init__(self, host, port, id=None, boot_host=None, boot_port=None):
if not id:
id = random_id()
ipv6 = True
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tab vs. space

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