Skip to main content

bind_socket

Function bind_socket 

Source
pub fn bind_socket(
    root: &Path,
    run_dir: &Path,
) -> Result<(LocalListener, SocketEndpoint)>
Expand description

Bind the owner tree’s local socket at socket_path in the runtime directory and return it with the endpoint that names it.

root is the owner tree’s root and run_dir is <root>/.onlyne/run, which is created 0700 bootstrap-style for a caller that binds before bootstrap has, and which survives only as SocketEndpoint::natural. Resolution happens before that creation, so a caller that needs binding and a client to agree on the digest resolves after bootstrap, which guarantees a canonical root.