diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
commit | a6f43190ab793b3487da2133735e166e337000c4 (patch) | |
tree | fc2dacc6a36f3ec04cf86a14cdea9c5bdf45274f /src/include/gnunet_connection_lib.h | |
parent | 61cfd3340e67672f351ab92dab7da72dca058c79 (diff) | |
download | gnunet-a6f43190ab793b3487da2133735e166e337000c4.tar.gz gnunet-a6f43190ab793b3487da2133735e166e337000c4.zip |
cancel pending write if we are just dead anyway
Diffstat (limited to 'src/include/gnunet_connection_lib.h')
-rw-r--r-- | src/include/gnunet_connection_lib.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index 570431165..0f6ae21e3 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h | |||
@@ -197,15 +197,23 @@ int GNUNET_CONNECTION_get_address (struct | |||
197 | *sock, void **addr, | 197 | *sock, void **addr, |
198 | size_t * addrlen); | 198 | size_t * addrlen); |
199 | 199 | ||
200 | |||
200 | /** | 201 | /** |
201 | * Close the socket and free associated resources. Pending | 202 | * Close the socket and free associated resources. Pending |
202 | * transmissions are simply dropped. A pending receive call will be | 203 | * transmissions may be completed or dropped depending on the |
203 | * called with an error code of "EPIPE". | 204 | * arguments. If a receive call is pending and should |
205 | * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' | ||
206 | * should be called explicitly first. | ||
204 | * | 207 | * |
205 | * @param sock socket to destroy | 208 | * @param sock socket to destroy |
209 | * @param finish_pending_write should pending writes be completed or aborted? | ||
210 | * (this applies to transmissions where the data has already been | ||
211 | * read from the application; all other transmissions should be | ||
212 | * aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel'). | ||
206 | */ | 213 | */ |
207 | void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle | 214 | void |
208 | *sock); | 215 | GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock, |
216 | int finish_pending_write); | ||
209 | 217 | ||
210 | 218 | ||
211 | /** | 219 | /** |