3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

core: support IPv6 connections

This commit is contained in:
James Lu 2015-10-02 23:17:57 -07:00
parent 7e57798f4d
commit 1c8ee5d84b
2 changed files with 7 additions and 2 deletions

View File

@ -99,7 +99,8 @@ class Irc():
port = self.serverdata["port"]
checks_ok = True
try:
self.socket = socket.socket()
stype = socket.AF_INET6 if self.serverdata.get("ipv6") else socket.AF_INET
self.socket = socket.socket(stype)
self.socket.setblocking(0)
# Initial connection timeout is a lot smaller than the timeout after
# we've connected; this is intentional.

View File

@ -101,7 +101,11 @@ servers:
# ssl_fingerprint: "e0fee1adf795c84eec4735f039503eb18d9c35cc"
ts6net:
ip: 127.0.0.1
ip: ::1
# Determines whether IPv6 should be used for this connection.
ipv6: yes
port: 7000
recvpass: "abcd"
sendpass: "abcd"