diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-06-20 09:24:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-06-20 09:24:05 +0000 |
commit | fc3387a40578c2ec8d0dc28d9d4ff9c9998a6e81 (patch) | |
tree | c787bb93154683716b891e0ef0b6590dad60d916 /src/include | |
parent | 5b3c889e3795aff706409921b622228a43d04205 (diff) | |
download | gnunet-fc3387a40578c2ec8d0dc28d9d4ff9c9998a6e81.tar.gz gnunet-fc3387a40578c2ec8d0dc28d9d4ff9c9998a6e81.zip |
Mantis 1716:
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_connection_lib.h | 15 | ||||
-rw-r--r-- | src/include/gnunet_network_lib.h | 11 | ||||
-rw-r--r-- | src/include/gnunet_server_lib.h | 12 |
3 files changed, 38 insertions, 0 deletions
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 | |||
@@ -114,6 +114,21 @@ void | |||
114 | GNUNET_CONNECTION_persist_(struct GNUNET_CONNECTION_Handle *sock); | 114 | GNUNET_CONNECTION_persist_(struct GNUNET_CONNECTION_Handle *sock); |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Disable the "CORK" feature for communication with the given socket, | ||
118 | * forcing the OS to immediately flush the buffer on transmission | ||
119 | * instead of potentially buffering multiple messages. Essentially | ||
120 | * reduces the OS send buffers to zero. | ||
121 | * Used to make sure that the last messages sent through the connection | ||
122 | * reach the other side before the process is terminated. | ||
123 | * | ||
124 | * @param sock the connection to make flushing and blocking | ||
125 | * @return GNUNET_OK on success | ||
126 | */ | ||
127 | int | ||
128 | GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock); | ||
129 | |||
130 | |||
131 | /** | ||
117 | * Create a socket handle by boxing an existing OS socket. The OS | 132 | * Create a socket handle by boxing an existing OS socket. The OS |
118 | * socket should henceforth be no longer used directly. | 133 | * socket should henceforth be no longer used directly. |
119 | * GNUNET_socket_destroy will close it. | 134 | * GNUNET_socket_destroy will close it. |
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index 34cb7bc32..1945d210f 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -240,6 +240,17 @@ int GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd, | |||
240 | int GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, | 240 | int GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, |
241 | int how); | 241 | int how); |
242 | 242 | ||
243 | /** | ||
244 | * Disable the "CORK" feature for communication with the given socket, | ||
245 | * forcing the OS to immediately flush the buffer on transmission | ||
246 | * instead of potentially buffering multiple messages. Essentially | ||
247 | * reduces the OS send buffers to zero. | ||
248 | * | ||
249 | * @param desc socket | ||
250 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | ||
251 | */ | ||
252 | int GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc); | ||
253 | |||
243 | 254 | ||
244 | /** | 255 | /** |
245 | * Create a new socket. Configure it for non-blocking IO and | 256 | * Create a new socket. Configure it for non-blocking IO and |
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index ca2041984..2bb530443 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h | |||
@@ -384,6 +384,18 @@ GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h, | |||
384 | 384 | ||
385 | 385 | ||
386 | /** | 386 | /** |
387 | * Disable the "CORK" feature for communication with the given client, | ||
388 | * forcing the OS to immediately flush the buffer on transmission | ||
389 | * instead of potentially buffering multiple messages. | ||
390 | * | ||
391 | * @param client handle to the client | ||
392 | * @return GNUNET_OK on success | ||
393 | */ | ||
394 | int | ||
395 | GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client); | ||
396 | |||
397 | |||
398 | /** | ||
387 | * The tansmit context is the key datastructure for a conveniance API | 399 | * The tansmit context is the key datastructure for a conveniance API |
388 | * used for transmission of complex results to the client followed | 400 | * used for transmission of complex results to the client followed |
389 | * ONLY by signaling receive_done with success or error | 401 | * ONLY by signaling receive_done with success or error |