[][src]Trait gio::TcpConnectionExt

pub trait TcpConnectionExt: 'static {
    fn get_graceful_disconnect(&self) -> bool;
fn set_graceful_disconnect(&self, graceful_disconnect: bool);
fn connect_property_graceful_disconnect_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all TcpConnection methods.

Implementors

TcpConnection

Required methods

fn get_graceful_disconnect(&self) -> bool

Checks if graceful disconnects are used. See TcpConnectionExt::set_graceful_disconnect.

Returns

true if graceful disconnect is used on close, false otherwise

fn set_graceful_disconnect(&self, graceful_disconnect: bool)

This enables graceful disconnects on close. A graceful disconnect means that we signal the receiving end that the connection is terminated and wait for it to close the connection before closing the connection.

A graceful disconnect means that we can be sure that we successfully sent all the outstanding data to the other end, or get an error reported. However, it also means we have to wait for all the data to reach the other side and for it to acknowledge this by closing the socket, which may take a while. For this reason it is disabled by default.

graceful_disconnect

Whether to do graceful disconnects or not

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

Loading content...

Implementors

impl<O: IsA<TcpConnection>> TcpConnectionExt for O[src]

Loading content...