diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-04-14 14:59:50 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-04-14 14:59:50 +0000 |
commit | 6e5be59c1f6f958c8403a3d0d70eaab82fc7908b (patch) | |
tree | 7dec58e8255150b5390850d97f450514cca34408 /src/include/gnunet_stream_lib.h | |
parent | 38f48d5fb82ca04c0c725189c47983c957c56c8f (diff) | |
download | gnunet-6e5be59c1f6f958c8403a3d0d70eaab82fc7908b.tar.gz gnunet-6e5be59c1f6f958c8403a3d0d70eaab82fc7908b.zip |
-stream connection halfclose and test cases
Diffstat (limited to 'src/include/gnunet_stream_lib.h')
-rw-r--r-- | src/include/gnunet_stream_lib.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/gnunet_stream_lib.h b/src/include/gnunet_stream_lib.h index ac2ce0854..099f37ab2 100644 --- a/src/include/gnunet_stream_lib.h +++ b/src/include/gnunet_stream_lib.h | |||
@@ -262,7 +262,10 @@ struct GNUNET_STREAM_IOReadHandle; | |||
262 | * @param write_cont the function to call upon writing some bytes into the | 262 | * @param write_cont the function to call upon writing some bytes into the |
263 | * stream | 263 | * stream |
264 | * @param write_cont_cls the closure | 264 | * @param write_cont_cls the closure |
265 | * @return handle to cancel the operation; NULL if a previous write is pending | 265 | * |
266 | * @return handle to cancel the operation; if a previous write is pending or | ||
267 | * the stream has been shutdown for this operation then write_cont is | ||
268 | * immediately called and NULL is returned. | ||
266 | */ | 269 | */ |
267 | struct GNUNET_STREAM_IOWriteHandle * | 270 | struct GNUNET_STREAM_IOWriteHandle * |
268 | GNUNET_STREAM_write (struct GNUNET_STREAM_Socket *socket, | 271 | GNUNET_STREAM_write (struct GNUNET_STREAM_Socket *socket, |
@@ -291,13 +294,16 @@ typedef size_t (*GNUNET_STREAM_DataProcessor) (void *cls, | |||
291 | 294 | ||
292 | 295 | ||
293 | /** | 296 | /** |
294 | * Tries to read data from the stream | 297 | * Tries to read data from the stream. |
295 | * | 298 | * |
296 | * @param socket the socket representing a stream | 299 | * @param socket the socket representing a stream |
297 | * @param timeout the timeout period | 300 | * @param timeout the timeout period |
298 | * @param proc function to call with data (once only) | 301 | * @param proc function to call with data (once only) |
299 | * @param proc_cls the closure for proc | 302 | * @param proc_cls the closure for proc |
300 | * @return handle to cancel the operation | 303 | * |
304 | * @return handle to cancel the operation; if the stream has been shutdown for | ||
305 | * this type of opeartion then the DataProcessor is immediately | ||
306 | * called with GNUNET_STREAM_SHUTDOWN as status and NULL if returned | ||
301 | */ | 307 | */ |
302 | struct GNUNET_STREAM_IOReadHandle * | 308 | struct GNUNET_STREAM_IOReadHandle * |
303 | GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket, | 309 | GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket, |