From fc3387a40578c2ec8d0dc28d9d4ff9c9998a6e81 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 20 Jun 2011 09:24:05 +0000 Subject: Mantis 1716: --- src/include/gnunet_connection_lib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/include/gnunet_connection_lib.h') diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index 700fef3db..3184e821b 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h @@ -113,6 +113,21 @@ typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, void GNUNET_CONNECTION_persist_(struct GNUNET_CONNECTION_Handle *sock); +/** + * Disable the "CORK" feature for communication with the given socket, + * forcing the OS to immediately flush the buffer on transmission + * instead of potentially buffering multiple messages. Essentially + * reduces the OS send buffers to zero. + * Used to make sure that the last messages sent through the connection + * reach the other side before the process is terminated. + * + * @param sock the connection to make flushing and blocking + * @return GNUNET_OK on success + */ +int +GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock); + + /** * Create a socket handle by boxing an existing OS socket. The OS * socket should henceforth be no longer used directly. -- cgit v1.2.3