"Fossies" - the Fresh Open Source Software archive

Member "glib-2.40.0/docs/reference/gio/html/GTcpConnection.html" (24 Mar 2014, 11026 Bytes) of archive /linux/misc/glib-2.40.0.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.

GTcpConnection

GTcpConnection — A TCP GSocketConnection

Functions

Properties

Types and Values

Object Hierarchy

    GObject
    ╰── GIOStream
        ╰── GSocketConnection
            ╰── GTcpConnection
                ╰── GTcpWrapperConnection

Includes

#include <gio/gio.h>

Description

This is the subclass of GSocketConnection that is created for TCP/IP sockets.

Functions

g_tcp_connection_set_graceful_disconnect ()

void
g_tcp_connection_set_graceful_disconnect
                               (GTcpConnection *connection,
                                gboolean graceful_disconnect);

This enabled 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.

Parameters

connection

a GTcpConnection

 

graceful_disconnect

Whether to do graceful disconnects or not

 

Since 2.22


g_tcp_connection_get_graceful_disconnect ()

gboolean
g_tcp_connection_get_graceful_disconnect
                               (GTcpConnection *connection);

Checks if graceful disconnects are used. See g_tcp_connection_set_graceful_disconnect().

Parameters

connection

a GTcpConnection

 

Returns

TRUE if graceful disconnect is used on close, FALSE otherwise

Since 2.22

Types and Values

GTcpConnection

typedef struct _GTcpConnection GTcpConnection;

A GSocketConnection for TCP/IP connections.

Since 2.22

Property Details

The “graceful-disconnect” property

  “graceful-disconnect”      gboolean

Whether or not close does a graceful disconnect.

Flags: Read / Write

Default value: FALSE

See Also

GSocketConnection.