(self, state)
Keep track of received and missed packets for performance tuning
Keep track of received and missed packets for performance tuning
Keep track of received and missed packets for performance tuning
def update_packet_count(self, state):
        "Keep track of received and missed packets for performance tuning"
        self.received_packets += 1
        missed_packets = state.packet_number - \
            self._last_state.packet_number - 1
        if missed_packets:
            self.dispatch_event('on_missed_packet', missed_packets)
        self.missed_packets += missed_packets
def update_packet_count ( self , state ) : self . received_packets += 1 missed_packets = state . packet_number - self . _last_state . packet_number - 1 if missed_packets : self . dispatch_event ( 'on_missed_packet' , missed_packets ) self . missed_packets += missed_packets