Пример #1
0
 def start_inbox_file(self, stream_id, data_size):
     from transport.udp import udp_interface
     from transport.udp import udp_stream
     if _Debug:
         lg.out(12, 'udp_file_queue.start_inbox_file %d %d %s' % (
             stream_id, data_size, self.session.peer_id))
     self.inboxFiles[stream_id] = InboxFile(self, stream_id, data_size)
     self.streams[stream_id] = udp_stream.create(stream_id, self.inboxFiles[stream_id], self)
     d = udp_interface.interface_register_file_receiving(
         self.session.peer_id, self.session.peer_idurl,
         self.inboxFiles[stream_id].filename, self.inboxFiles[stream_id].size)
     d.addCallback(self.on_inbox_file_registered, stream_id)
     d.addErrback(self.on_inbox_file_register_failed, stream_id)
     self.inboxFiles[stream_id].registration = d
Пример #2
0
 def start_inbox_file(self, stream_id, data_size):
     from transport.udp import udp_interface
     from transport.udp import udp_stream
     if _Debug:
         lg.out(12, 'udp_file_queue.start_inbox_file %d %d %s' %
                (stream_id, data_size, self.session.peer_id))
     self.inboxFiles[stream_id] = InboxFile(self, stream_id, data_size)
     self.streams[stream_id] = udp_stream.create(
         stream_id, self.inboxFiles[stream_id], self)
     d = udp_interface.interface_register_file_receiving(
         self.session.peer_id, self.session.peer_idurl,
         self.inboxFiles[stream_id].filename, self.inboxFiles[stream_id].size)
     d.addCallback(self.on_inbox_file_registered, stream_id)
     d.addErrback(self.on_inbox_file_register_failed, stream_id)
     self.inboxFiles[stream_id].registration = d