pub struct IpcConnection {
pub reader: IpcReader,
pub writer: IpcWriter,
}Expand description
IPC connection handle (combines reader and writer)
Fields§
§reader: IpcReaderThe reader half of the connection.
writer: IpcWriterThe writer half of the connection.
Implementations§
Source§impl IpcConnection
impl IpcConnection
Sourcepub fn from_stream(stream: UnixStream) -> Self
pub fn from_stream(stream: UnixStream) -> Self
Create an IPC connection from a Unix stream
Sourcepub async fn connect_to_agent(
sessions_dir: &Path,
session_id: &str,
) -> Result<Self>
pub async fn connect_to_agent( sessions_dir: &Path, session_id: &str, ) -> Result<Self>
Connect to an agent by session ID, looking up the socket in sessions_dir
Sourcepub fn upgrade_to_encrypted(self, session_token: &str) -> EncryptedIpcConnection
pub fn upgrade_to_encrypted(self, session_token: &str) -> EncryptedIpcConnection
Upgrade to encrypted connection using the session token
This should be called after the handshake is complete and both sides have agreed on the session token.
Auto Trait Implementations§
impl Freeze for IpcConnection
impl RefUnwindSafe for IpcConnection
impl Send for IpcConnection
impl Sync for IpcConnection
impl Unpin for IpcConnection
impl UnsafeUnpin for IpcConnection
impl UnwindSafe for IpcConnection
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