+ def _sniff(self, recv_port: Port):
+ """Sniff packets and use events and queue to communicate with the main thread.
+
+ Raises:
+ InteractiveSSHSessionDeadError: If the SSH connection has been unexpectedly interrupted.
+ """
+ ready_prompt = "Ready."
+ self.send_command(
+ "sniff("
+ f'iface="{recv_port.logical_name}", quiet=True, store=False, '
+ "prn=lambda p: bytes_base64(p.build()).decode(), "
+ f'started_callback=lambda: print("{ready_prompt}")'
+ ")",
+ prompt=ready_prompt,
+ )
+ self._ssh_channel.settimeout(1)
Not a big deal at all and I don't know what the "standard" is, but is there any reason why this number isn't higher? Like 10? I guess the point of the timeout is to protect against hanging, versus protect against slow operations (regardless of what the source of that slowness may be).
--
2.43.0