Skip to content

Instantly share code, notes, and snippets.

View little-dude's full-sized avatar
🍉

little-dude

🍉
View GitHub Profile
//! This module provides implementations of `ActiveConnector` and `PassiveConnector` that are backed
//! by UNIX socket instead of the TCP sockets that are normally used.
//!
//! Using UNIX sockets instead of TCP ones serves multiple purpose:
//!
//! - creating and connecting to UNIX socket doesn't require specific permissions so using them in
//! tests mean that non-root users can run the tests. With TCP, listening on some ports may
//! require root privileges.
//! - We can easily create namespaces for the sockets used in each test by simply using the
//! filesystem hierarchy which means we avoid the classic "address already in use" pitfall. For