Skip to content
Snippets Groups Projects
direct.py 297 B
Newer Older
  • Learn to ignore specific revisions
  • Jarrod Pas's avatar
    Jarrod Pas committed
    def direct(self, packet, state):
        '''
        Routes a packet via direct contact to the destination.
        Returns True if the packet was sent successfully, otherwise False.
        '''
        for met in self.links:
            if packet.destination == met:
                self.send(met, packet)
        return False