[][src]Struct sunrise_kernel::ipc::session::ServerSession

pub struct ServerSession(Arc<Session>);

The server side of a Session.

Implementations

impl ServerSession[src]

pub fn receive(
    &self,
    buf: UserSpacePtrMut<[u8]>,
    has_c_descriptors: bool
) -> Result<(), UserspaceError>
[src]

Receive an IPC request through the server pipe. Takes a userspace buffer containing an empty IPC message. The request may optionally contain a C descriptor in order to receive X descriptors. The buffer will be filled with an IPC request.

This function does not wait. It assumes an active_request has already been set by a prior call to wait.

pub fn reply(&self, buf: UserSpacePtr<[u8]>) -> Result<(), UserspaceError>[src]

Replies to the currently active IPC request on the server pipe. Takes a userspace buffer containing the IPC reply. The kernel will copy the reply to the sender's IPC buffer, before waking the sender so it may return to userspace.

Panics

Panics if there is no currently active request on the pipe.

Trait Implementations

impl Clone for ServerSession[src]

impl Debug for ServerSession[src]

impl Drop for ServerSession[src]

impl Waitable for ServerSession[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.