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