Struct sozu_command_lib::scm_socket::ScmSocket
source · pub struct ScmSocket {
pub fd: RawFd,
pub blocking: bool,
}
Expand description
A unix socket specialized for file descriptor passing
Fields§
§fd: RawFd
§blocking: bool
Implementations§
source§impl ScmSocket
impl ScmSocket
sourcepub fn new(fd: RawFd) -> Result<Self, ScmSocketError>
pub fn new(fd: RawFd) -> Result<Self, ScmSocketError>
Create a blocking SCM socket from a raw file descriptor (unsafe)
sourcepub fn set_blocking(&mut self, blocking: bool) -> Result<(), ScmSocketError>
pub fn set_blocking(&mut self, blocking: bool) -> Result<(), ScmSocketError>
Use the standard library (unsafe) to set the socket to blocking / unblocking
sourcepub fn send_listeners(
&self,
listeners: &Listeners
) -> Result<(), ScmSocketError>
pub fn send_listeners( &self, listeners: &Listeners ) -> Result<(), ScmSocketError>
Send listeners (socket addresses and file descriptors) via an scm socket
sourcepub fn receive_listeners(&self) -> Result<Listeners, ScmSocketError>
pub fn receive_listeners(&self) -> Result<Listeners, ScmSocketError>
Receive and parse listeners (socket addresses and file descriptors) via an scm socket
Trait Implementations§
source§impl<'de> Deserialize<'de> for ScmSocket
impl<'de> Deserialize<'de> for ScmSocket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ScmSocket
impl Send for ScmSocket
impl Sync for ScmSocket
impl Unpin for ScmSocket
impl UnwindSafe for ScmSocket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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