(self)
| 85 | self.updateName() |
| 86 | |
| 87 | def createSocket(self): |
| 88 | if helper.getIpType(self.ip) == "ipv6" and not hasattr(socket, "socket_noproxy"): |
| 89 | # Create IPv6 connection as IPv4 when using proxy |
| 90 | return socket.socket(socket.AF_INET6, socket.SOCK_STREAM) |
| 91 | else: |
| 92 | return socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 93 | |
| 94 | def updateName(self): |
| 95 | self.name = "Conn#%2s %-12s [%s]" % (self.id, self.ip, self.protocol) |