pub struct PreRawMessageChannel(/* private fields */);
Expand description
A sendable handle for establishing RawMessageChannel
s with processes you can already communicate with.
PreRawMessageChannel
s are created in pairs, and then can be freely sent along any IPC method in this
crate capable of transmitting OS resources. When they reach their destination they can be converted
into RawMessageChannel
s.
Implementations§
Source§impl PreRawMessageChannel
impl PreRawMessageChannel
pub fn pair() -> Result<(Self, Self)>
Sourcepub fn into_raw_channel(
self,
remote_process: ProcessHandle,
tokio_loop: &TokioHandle,
) -> Result<RawMessageChannel>
pub fn into_raw_channel( self, remote_process: ProcessHandle, tokio_loop: &TokioHandle, ) -> Result<RawMessageChannel>
Creates a RawMessageChannel
from a transmitted pre-channel and a remote process handle.
§Security
You should only allow more trusted processes to hold unsealed channels to less trusted processes. On some platforms unsealed channels allow the holder to interfere with the other process.
Using an incorrect remote process handle may cause this function to fail or transmission of OS resources (files, sockets, etc.) accross the channel to fail.
Sourcepub fn into_sealed_raw_channel(
self,
tokio_loop: &TokioHandle,
) -> Result<RawMessageChannel>
pub fn into_sealed_raw_channel( self, tokio_loop: &TokioHandle, ) -> Result<RawMessageChannel>
Creates a sealed RawMessageChannel
from a transmitted pre-channel.
Sealed channels cannot transmit OS resources (files, sockets, etc.) but can still transmit data (they may receive OS resources if the other side is unsealed). It is recommended that you use a sealed channel handle when communicating from the less trusted side of a channel.