[−][src]Struct sunrise_libuser::types::ServerSession
The server side of an IPC session.
Usually obtained by calling accept, but may also be obtained by calling the create_session syscall, providing a server/client session pair.
Implementations
impl ServerSession
[src]
pub fn receive(
&self,
buf: &mut [u8],
timeout: Option<usize>
) -> Result<(), Error>
[src]
&self,
buf: &mut [u8],
timeout: Option<usize>
) -> Result<(), Error>
Receives an IPC request from the session, waiting if none are available yet. The buffer should contain an empty message, optionally containing a C descriptor, and will contain the reply on output.
If a C descriptor is provided, it will be used as the buffer to copy the request's X descriptor into.
This is a low-level primitives that is usually wrapped by a higher-level library. Look at the ipc module for more information on the IPC message format.
pub fn reply(&self, buf: &mut [u8]) -> Result<(), Error>
[src]
Replies to an IPC request on the given session. If the given session did not have a pending request, this function will error out.
This is a low-level primitives that is usually wrapped by a higher-level library. Look at the ipc module for more information on the IPC message format.
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 request.
Once this function returns, calling ServerSession::receive() is guaranteed not to block.
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 ServerSession
impl Send for ServerSession
impl Sync for ServerSession
impl Unpin for ServerSession
impl UnwindSafe for ServerSession
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>,