MCPcopy Create free account
hub / github.com/secdev/scapy / on_trigger

Method on_trigger

scapy/scapypipes.py:683–696  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

681 self.q.put((False, msg))
682
683 def on_trigger(self, msg):
684 # type: (bool) -> None
685 self.opened ^= True
686 self._trigger(msg)
687 while True:
688 try:
689 low, msg = self.q.get(block=False)
690 except Empty:
691 break
692 else:
693 if low:
694 self._send(msg)
695 else:
696 self._high_send(msg)
697
698
699class TriggeredSwitch(Drain):

Callers

nothing calls this directly

Calls 4

_triggerMethod · 0.80
_high_sendMethod · 0.80
getMethod · 0.45
_sendMethod · 0.45

Tested by

no test coverage detected