_net
_net
¶
Network utility helpers shared across lifecycle managers.
probe_unix_socket(path, *, timeout=2.0)
¶
Return True if the Unix socket at path accepts connections.
Source code in src/terok_sandbox/_util/_net.py
prepare_socket_path(path)
¶
Ensure path is ready for bind() — remove stale sockets, create parents.
Refuses to unlink non-socket files. After bind(), the caller should
call harden_socket to restrict permissions.