[][src]Trait gio::SocketExt

pub trait SocketExt: 'static {
    fn accept<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
        &self,
        cancellable: Q
    ) -> Result<Socket, Error>;
fn bind<P: IsA<SocketAddress>>(
        &self,
        address: &P,
        allow_reuse: bool
    ) -> Result<(), Error>;
fn check_connect_result(&self) -> Result<(), Error>;
fn close(&self) -> Result<(), Error>;
fn condition_check(&self, condition: IOCondition) -> IOCondition;
fn condition_timed_wait<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
        &self,
        condition: IOCondition,
        timeout: i64,
        cancellable: Q
    ) -> Result<(), Error>;
fn condition_wait<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
        &self,
        condition: IOCondition,
        cancellable: Q
    ) -> Result<(), Error>;
fn connect<'a, P: IsA<SocketAddress>, Q: IsA<Cancellable> + 'a, R: Into<Option<&'a Q>>>(
        &self,
        address: &P,
        cancellable: R
    ) -> Result<(), Error>;
fn connection_factory_create_connection(&self) -> Option<SocketConnection>;
fn get_available_bytes(&self) -> isize;
fn get_blocking(&self) -> bool;
fn get_broadcast(&self) -> bool;
fn get_credentials(&self) -> Result<Credentials, Error>;
fn get_family(&self) -> SocketFamily;
fn get_keepalive(&self) -> bool;
fn get_listen_backlog(&self) -> i32;
fn get_local_address(&self) -> Result<SocketAddress, Error>;
fn get_multicast_loopback(&self) -> bool;
fn get_multicast_ttl(&self) -> u32;
fn get_option(&self, level: i32, optname: i32) -> Result<i32, Error>;
fn get_protocol(&self) -> SocketProtocol;
fn get_remote_address(&self) -> Result<SocketAddress, Error>;
fn get_socket_type(&self) -> SocketType;
fn get_timeout(&self) -> u32;
fn get_ttl(&self) -> u32;
fn is_closed(&self) -> bool;
fn is_connected(&self) -> bool;
fn join_multicast_group<'a, P: IsA<InetAddress>, Q: Into<Option<&'a str>>>(
        &self,
        group: &P,
        source_specific: bool,
        iface: Q
    ) -> Result<(), Error>;
fn leave_multicast_group<'a, P: IsA<InetAddress>, Q: Into<Option<&'a str>>>(
        &self,
        group: &P,
        source_specific: bool,
        iface: Q
    ) -> Result<(), Error>;
fn listen(&self) -> Result<(), Error>;
fn set_blocking(&self, blocking: bool);
fn set_broadcast(&self, broadcast: bool);
fn set_keepalive(&self, keepalive: bool);
fn set_listen_backlog(&self, backlog: i32);
fn set_multicast_loopback(&self, loopback: bool);
fn set_multicast_ttl(&self, ttl: u32);
fn set_option(
        &self,
        level: i32,
        optname: i32,
        value: i32
    ) -> Result<(), Error>;
fn set_timeout(&self, timeout: u32);
fn set_ttl(&self, ttl: u32);
fn shutdown(
        &self,
        shutdown_read: bool,
        shutdown_write: bool
    ) -> Result<(), Error>;
fn speaks_ipv4(&self) -> bool;
fn get_property_type(&self) -> SocketType;
fn connect_property_blocking_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_broadcast_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_keepalive_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_listen_backlog_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_local_address_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_multicast_loopback_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_multicast_ttl_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_remote_address_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_timeout_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_ttl_notify<F: Fn(&Self) + Send + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Required methods

fn accept<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
    &self,
    cancellable: Q
) -> Result<Socket, Error>

fn bind<P: IsA<SocketAddress>>(
    &self,
    address: &P,
    allow_reuse: bool
) -> Result<(), Error>

fn check_connect_result(&self) -> Result<(), Error>

fn close(&self) -> Result<(), Error>

fn condition_check(&self, condition: IOCondition) -> IOCondition

fn condition_timed_wait<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
    &self,
    condition: IOCondition,
    timeout: i64,
    cancellable: Q
) -> Result<(), Error>

fn condition_wait<'a, P: IsA<Cancellable> + 'a, Q: Into<Option<&'a P>>>(
    &self,
    condition: IOCondition,
    cancellable: Q
) -> Result<(), Error>

fn connect<'a, P: IsA<SocketAddress>, Q: IsA<Cancellable> + 'a, R: Into<Option<&'a Q>>>(
    &self,
    address: &P,
    cancellable: R
) -> Result<(), Error>

fn connection_factory_create_connection(&self) -> Option<SocketConnection>

fn get_available_bytes(&self) -> isize

fn get_blocking(&self) -> bool

fn get_broadcast(&self) -> bool

fn get_credentials(&self) -> Result<Credentials, Error>

fn get_family(&self) -> SocketFamily

fn get_keepalive(&self) -> bool

fn get_listen_backlog(&self) -> i32

fn get_local_address(&self) -> Result<SocketAddress, Error>

fn get_multicast_loopback(&self) -> bool

fn get_multicast_ttl(&self) -> u32

fn get_option(&self, level: i32, optname: i32) -> Result<i32, Error>

fn get_protocol(&self) -> SocketProtocol

fn get_remote_address(&self) -> Result<SocketAddress, Error>

fn get_socket_type(&self) -> SocketType

fn get_timeout(&self) -> u32

fn get_ttl(&self) -> u32

fn is_closed(&self) -> bool

fn is_connected(&self) -> bool

fn join_multicast_group<'a, P: IsA<InetAddress>, Q: Into<Option<&'a str>>>(
    &self,
    group: &P,
    source_specific: bool,
    iface: Q
) -> Result<(), Error>

fn leave_multicast_group<'a, P: IsA<InetAddress>, Q: Into<Option<&'a str>>>(
    &self,
    group: &P,
    source_specific: bool,
    iface: Q
) -> Result<(), Error>

fn listen(&self) -> Result<(), Error>

fn set_blocking(&self, blocking: bool)

fn set_broadcast(&self, broadcast: bool)

fn set_keepalive(&self, keepalive: bool)

fn set_listen_backlog(&self, backlog: i32)

fn set_multicast_loopback(&self, loopback: bool)

fn set_multicast_ttl(&self, ttl: u32)

fn set_option(&self, level: i32, optname: i32, value: i32) -> Result<(), Error>

fn set_timeout(&self, timeout: u32)

fn set_ttl(&self, ttl: u32)

fn shutdown(
    &self,
    shutdown_read: bool,
    shutdown_write: bool
) -> Result<(), Error>

fn speaks_ipv4(&self) -> bool

fn get_property_type(&self) -> SocketType

fn connect_property_blocking_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_broadcast_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_keepalive_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_listen_backlog_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_local_address_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_multicast_loopback_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_multicast_ttl_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_remote_address_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_timeout_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_ttl_notify<F: Fn(&Self) + Send + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<Socket>> SocketExt for O[src]

Loading content...