Newer
Older
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