(host: str, port: int, timeout_seconds: float = 1.5)
| 40 | |
| 41 | |
| 42 | def can_connect_tcp(host: str, port: int, timeout_seconds: float = 1.5) -> bool: |
| 43 | try: |
| 44 | with socket.create_connection((host, port), timeout=timeout_seconds): |
| 45 | return True |
| 46 | except OSError: |
| 47 | return False |
| 48 | |
| 49 | def log(message: str, level: str = "INFO") -> None: |
| 50 | LOGS_DIR.mkdir(exist_ok=True) |
no outgoing calls
no test coverage detected