[−][src]Struct sunrise_libuser::types::ServerPort
The server side of an IPC Port. Allows listening for connections, providing a session on which to answer remote procedures from.
Usually obtained by registering a service through the sm: service manager, or by calling manage_named_port to obtained a kernel-managed port.
Implementations
impl ServerPort
[src]
pub fn accept(&self) -> Result<ServerSession, Error>
[src]
Accepts a connection to the port, returning a server session on which to listen and reply to IPC request.
pub fn wait_async(
&self,
queue: WorkQueue
) -> impl Future<Output = Result<(), Error>> + Unpin
[src]
&self,
queue: WorkQueue
) -> impl Future<Output = Result<(), Error>> + Unpin
Waits for the server to receive a connection.
Once this function returns, the next call to ServerPort::accept() is guaranteed not to block. Attention: Because accept does not have any non-blocking mode, it is dangerous to share a ServerPort across multiple futures or threads (since multiple threads or futures will get woken up and attempt accepting, but only one accept will not block).
If you wish to wait on a server port from multiple threads, please ensure that calls to the accept functions are wrapped in a mutex.
Panics
Panics if used from outside the context of a Future spawned on a libuser future executor. Please make sure you only call this function from a future spawned on a WaitableManager.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ServerPort
impl Send for ServerPort
impl Sync for ServerPort
impl Unpin for ServerPort
impl UnwindSafe for ServerPort
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,