MCPcopy Index your code
hub / github.com/secdev/scapy / _setup_thread

Method _setup_thread

scapy/sendrecv.py:1161–1176  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1159 self.stop_cb = lambda: None # type: Callable[[], None]
1160
1161 def _setup_thread(self):
1162 # type: () -> None
1163 def _run_catch(self=self, *args, **kwargs):
1164 # type: (Any, *Any, **Any) -> None
1165 try:
1166 self._run(*args, **kwargs)
1167 except Exception as ex:
1168 self.exception = ex
1169 # Prepare sniffing thread
1170 self.thread = Thread(
1171 target=_run_catch,
1172 args=self.args,
1173 kwargs=self.kwargs,
1174 name="AsyncSniffer"
1175 )
1176 self.thread.daemon = True
1177
1178 def _run(self,
1179 count=0, # type: int

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected