[][src]Trait gio::prelude::SocketListenerExtManual

pub trait SocketListenerExtManual: Sized {
    fn accept_socket_async<Q: FnOnce(Result<(Socket, Option<Object>), Error>) + Send + 'static, C: IsA<Cancellable>>(
        &self,
        cancellable: Option<&C>,
        callback: Q
    );
fn accept_socket_async_future(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<(Socket, Option<Object>), Error>> + 'static>>;
fn accept_async<C: IsA<Cancellable>, Q: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + Send + 'static>(
        &self,
        cancellable: Option<&C>,
        callback: Q
    );
fn accept_async_future(
        &self
    ) -> Pin<Box_<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>> + 'static>>; }

Required methods

fn accept_socket_async<Q: FnOnce(Result<(Socket, Option<Object>), Error>) + Send + 'static, C: IsA<Cancellable>>(
    &self,
    cancellable: Option<&C>,
    callback: Q
)

This is the asynchronous version of SocketListenerExt::accept_socket.

When the operation is finished callback will be called. You can then call SocketListenerExt::accept_socket_finish to get the result of the operation.

cancellable

a Cancellable, or None

callback

a GAsyncReadyCallback

user_data

user data for the callback

fn accept_socket_async_future(
    &self
) -> Pin<Box<dyn Future<Output = Result<(Socket, Option<Object>), Error>> + 'static>>

fn accept_async<C: IsA<Cancellable>, Q: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + Send + 'static>(
    &self,
    cancellable: Option<&C>,
    callback: Q
)

This is the asynchronous version of SocketListenerExt::accept.

When the operation is finished callback will be called. You can then call SocketListenerExt::accept_socket to get the result of the operation.

cancellable

a Cancellable, or None

callback

a GAsyncReadyCallback

user_data

user data for the callback

fn accept_async_future(
    &self
) -> Pin<Box_<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>> + 'static>>

Loading content...

Implementors

impl<O: IsA<SocketListener>> SocketListenerExtManual for O[src]

Loading content...