diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-04-06 07:46:24 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-04-06 07:46:24 +0000 |
commit | de986871fad51b69ccfc30c97a132e8cf45d94a7 (patch) | |
tree | a63a1c8a8e17bdc34b07109b3a22eafa9f989155 /src/include/gnunet_stream_lib.h | |
parent | 67480d02e8729308defdc5256dd00dc3b887a5ea (diff) | |
download | gnunet-de986871fad51b69ccfc30c97a132e8cf45d94a7.tar.gz gnunet-de986871fad51b69ccfc30c97a132e8cf45d94a7.zip |
-shutdown completion callback
Diffstat (limited to 'src/include/gnunet_stream_lib.h')
-rw-r--r-- | src/include/gnunet_stream_lib.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/include/gnunet_stream_lib.h b/src/include/gnunet_stream_lib.h index a16d052d6..4a574dfe4 100644 --- a/src/include/gnunet_stream_lib.h +++ b/src/include/gnunet_stream_lib.h | |||
@@ -131,15 +131,31 @@ struct GNUNET_STREAM_ShutdownHandle; | |||
131 | 131 | ||
132 | 132 | ||
133 | /** | 133 | /** |
134 | * Completion callback for shutdown | ||
135 | * | ||
136 | * @param cls the closure from GNUNET_STREAM_shutdown call | ||
137 | * @param operation the operation that was shutdown (SHUT_RD, SHUT_WR, | ||
138 | * SHUT_RDWR) | ||
139 | */ | ||
140 | typedef void (*GNUNET_STREAM_ShutdownCompletion) (void *cls, | ||
141 | int operation); | ||
142 | |||
143 | |||
144 | /** | ||
134 | * Shutdown the stream for reading or writing (man 2 shutdown). | 145 | * Shutdown the stream for reading or writing (man 2 shutdown). |
135 | * | 146 | * |
136 | * @param socket the stream socket | 147 | * @param socket the stream socket |
137 | * @param how SHUT_RD, SHUT_WR or SHUT_RDWR | 148 | * @param opertion SHUT_RD, SHUT_WR or SHUT_RDWR |
149 | * @param completion_cb the callback that will be called upon successful | ||
150 | * shutdown of given operation | ||
151 | * @param completion_cls the closure for the completion callback | ||
138 | * @return the shutdown handle | 152 | * @return the shutdown handle |
139 | */ | 153 | */ |
140 | struct GNUNET_STREAM_ShutdownHandle * | 154 | struct GNUNET_STREAM_ShutdownHandle * |
141 | GNUNET_STREAM_shutdown (struct GNUNET_STREAM_Socket *socket, | 155 | GNUNET_STREAM_shutdown (struct GNUNET_STREAM_Socket *socket, |
142 | int how); | 156 | int operation, |
157 | GNUNET_STREAM_ShutdownCompletion completion_cb, | ||
158 | void *completion_cls); | ||
143 | 159 | ||
144 | 160 | ||
145 | /** | 161 | /** |