Trait gio::prelude::SocketConnectionExt
source · [−]pub trait SocketConnectionExt: 'static {
fn connect(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>;
fn connect_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn connect_future(
&self,
address: &impl IsA<SocketAddress> + Clone + 'static
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
fn local_address(&self) -> Result<SocketAddress, Error>;
fn remote_address(&self) -> Result<SocketAddress, Error>;
fn socket(&self) -> Socket;
fn is_connected(&self) -> bool;
}
Required Methods
sourcefn connect(
fn connect(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
sourcefn connect_async<P: FnOnce(Result<(), Error>) + 'static>(
fn connect_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn connect_future(
fn connect_future(
&self,
address: &impl IsA<SocketAddress> + Clone + 'static
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
source
fn local_address(&self) -> Result<SocketAddress, Error>
source
fn remote_address(&self) -> Result<SocketAddress, Error>
source