pub struct SocatBridge { /* private fields */ }Expand description
A socat bridge between a Unix socket and a TCP port.
Implementations§
Source§impl SocatBridge
impl SocatBridge
Sourcepub async fn unix_to_tcp(
socket_path: PathBuf,
tcp_host: &str,
tcp_port: u16,
) -> Result<Self, SandboxError>
pub async fn unix_to_tcp( socket_path: PathBuf, tcp_host: &str, tcp_port: u16, ) -> Result<Self, SandboxError>
Create a bridge from a Unix socket to a TCP port. The Unix socket will be created and listen for connections. Each connection will be forwarded to the TCP port.
Sourcepub fn tcp_to_unix_command(tcp_port: u16, socket_path: &str) -> String
pub fn tcp_to_unix_command(tcp_port: u16, socket_path: &str) -> String
Create a bridge from a TCP port to a Unix socket. This is used inside the sandbox to connect to the host proxies.
Sourcepub fn socket_path(&self) -> &PathBuf
pub fn socket_path(&self) -> &PathBuf
Get the socket path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SocatBridge
impl !RefUnwindSafe for SocatBridge
impl Send for SocatBridge
impl Sync for SocatBridge
impl Unpin for SocatBridge
impl !UnwindSafe for SocatBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more