Skip to main content

ThreadedSocketServiceExt

Trait ThreadedSocketServiceExt 

Source
pub trait ThreadedSocketServiceExt: IsA<ThreadedSocketService> + 'static {
    // Provided methods
    fn max_threads(&self) -> i32 { ... }
    fn connect_run<F>(&self, f: F) -> SignalHandlerId
       where F: Fn(&Self, &SocketConnection, Option<&Object>) -> bool + 'static { ... }
}
Expand description

Trait containing all ThreadedSocketService methods.

§Implementors

ThreadedSocketService

Provided Methods§

Source

fn max_threads(&self) -> i32

The maximum number of threads handling clients for this service.

Source

fn connect_run<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &SocketConnection, Option<&Object>) -> bool + 'static,

The ::run signal is emitted in a worker thread in response to an incoming connection. This thread is dedicated to handling @connection and may perform blocking IO. The signal handler need not return until the connection is closed.

§connection

a new #GSocketConnection object.

§source_object

the source_object passed to g_socket_listener_add_address().

§Returns

true to stop further signal handlers from being called

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§