def __init__(self, packet, file_handler_cls, remote_addr, extra_opts=None): self.packet_factory = TFTPPacketFactory( supported_opts=self.supported_opts, default_opts=self.default_opts) self.remote_addr = remote_addr self.packet = self.packet_factory.from_bytes(packet) self.extra_opts = extra_opts or {} self.file_handler_cls = file_handler_cls self.retransmit = None self.file_handler = None self.finished = False
def __init__(self, host_interface, loop, extra_opts): self.host_interface = host_interface self.loop = loop self.extra_opts = extra_opts self.packet_factory = TFTPPacketFactory()
def __init__(self, args, loop, extra_opts): self.host_interface = args.host self.loop = loop self.extra_opts = extra_opts self.args = args self.packet_factory = TFTPPacketFactory()
def setUp(self): self.packet_factory = TFTPPacketFactory()
def setUpClass(cls): cls.packet_factory = TFTPPacketFactory()