package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Tcp_connection

type t = [ `tcp_connection | `socket_connection | `io_stream | `object_ ] Gobject.obj
val set_graceful_disconnect : t -> bool -> unit

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.

val get_graceful_disconnect : t -> bool

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