def __init__(self, host, port=None, logfile=None): if port is None: port = self.port sock = socket.connect_udp(host, port) super(UDPClient, self).__init__(sock, logfile)
def __init__(self, host, protocol, port=None, logfile=None): self._sock = None port = port or self.PORT sock = socket.connect_udp(host, port) super(UDPClient, self).__init__(sock, protocol, logfile)