Trait gio::prelude::SocketListenerExt
source · [−]pub trait SocketListenerExt: 'static {
Show 16 methods
fn accept(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(SocketConnection, Option<Object>), Error>;
fn accept_async<P: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn accept_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>> + 'static>>;
fn accept_socket(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(Socket, Option<Object>), Error>;
fn accept_socket_async<P: FnOnce(Result<(Socket, Option<Object>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn accept_socket_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(Socket, Option<Object>), Error>> + 'static>>;
fn add_address(
&self,
address: &impl IsA<SocketAddress>,
type_: SocketType,
protocol: SocketProtocol,
source_object: Option<&impl IsA<Object>>
) -> Result<SocketAddress, Error>;
fn add_any_inet_port(
&self,
source_object: Option<&impl IsA<Object>>
) -> Result<u16, Error>;
fn add_inet_port(
&self,
port: u16,
source_object: Option<&impl IsA<Object>>
) -> Result<(), Error>;
fn add_socket(
&self,
socket: &impl IsA<Socket>,
source_object: Option<&impl IsA<Object>>
) -> Result<(), Error>;
fn close(&self);
fn set_backlog(&self, listen_backlog: i32);
fn listen_backlog(&self) -> i32;
fn set_listen_backlog(&self, listen_backlog: i32);
fn connect_event<F: Fn(&Self, SocketListenerEvent, &Socket) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_listen_backlog_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Required Methods
sourcefn accept(
fn accept(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(SocketConnection, Option<Object>), Error>
sourcefn accept_async<P: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + 'static>(
fn accept_async<P: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn accept_future(
fn accept_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>> + 'static>>
sourcefn accept_socket(
fn accept_socket(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(Socket, Option<Object>), Error>
sourcefn accept_socket_async<P: FnOnce(Result<(Socket, Option<Object>), Error>) + 'static>(
fn accept_socket_async<P: FnOnce(Result<(Socket, Option<Object>), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn accept_socket_future(
fn accept_socket_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(Socket, Option<Object>), Error>> + 'static>>
sourcefn add_address(
fn add_address(
&self,
address: &impl IsA<SocketAddress>,
type_: SocketType,
protocol: SocketProtocol,
source_object: Option<&impl IsA<Object>>
) -> Result<SocketAddress, Error>
sourcefn add_inet_port(
fn add_inet_port(
&self,
port: u16,
source_object: Option<&impl IsA<Object>>
) -> Result<(), Error>
sourcefn add_socket(
fn add_socket(
&self,
socket: &impl IsA<Socket>,
source_object: Option<&impl IsA<Object>>
) -> Result<(), Error>
source
fn set_backlog(&self, listen_backlog: i32)
source
fn listen_backlog(&self) -> i32
source
fn set_listen_backlog(&self, listen_backlog: i32)
sourcefn connect_event<F: Fn(&Self, SocketListenerEvent, &Socket) + 'static>(
fn connect_event<F: Fn(&Self, SocketListenerEvent, &Socket) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_listen_backlog_notify<F: Fn(&Self) + 'static>(