GIO Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GTcpConnection; void g_tcp_connection_set_graceful_disconnect (GTcpConnection *connection
,gboolean graceful_disconnect
); gboolean g_tcp_connection_get_graceful_disconnect (GTcpConnection *connection
);
GObject +----GIOStream +----GSocketConnection +----GTcpConnection +----GTcpWrapperConnection
typedef struct _GTcpConnection GTcpConnection;
A GSocketConnection for UNIX domain socket connections.
Since 2.22
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 recieving 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.
|
a GTcpConnection |
|
Whether to do graceful disconnects or not |
Since 2.22
gboolean g_tcp_connection_get_graceful_disconnect
(GTcpConnection *connection
);
Checks if graceful disconnects are used. See
g_tcp_connection_set_graceful_disconnect()
.
|
a GTcpConnection |
Returns : |
TRUE if graceful disconnect is used on close, FALSE otherwise |
Since 2.22
"graceful-disconnect"
property"graceful-disconnect" gboolean : Read / Write
Whether or not close does a graceful disconnect.
Default value: FALSE