aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-02-14 16:15:07 +0000
committerLRN <lrn1986@gmail.com>2013-02-14 16:15:07 +0000
commita2d71d8b9fa77325d466e47499d3da18c6b17a1f (patch)
tree0a5230145cfa7660ed6789a22b8541dc351f3cc8 /src/include/gnunet_disk_lib.h
parent2c3613ca587b571d45ea29da1f6ed15dace0b527 (diff)
downloadgnunet-a2d71d8b9fa77325d466e47499d3da18c6b17a1f.tar.gz
gnunet-a2d71d8b9fa77325d466e47499d3da18c6b17a1f.zip
Make pipe ends detachable, fix W32 corner-cases
Now pipe ends are fully-functional FileHandles. You can detach them from the pipe, and closing pipe will not affect them afterwards. Tightened W32 implementation (make it close events!)
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r--src/include/gnunet_disk_lib.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index dd42f9e91..0f36353b0 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -467,6 +467,22 @@ GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
467 enum GNUNET_DISK_PipeEnd end); 467 enum GNUNET_DISK_PipeEnd end);
468 468
469/** 469/**
470 * Detaches one of the ends from the pipe.
471 * Detached end is a fully-functional FileHandle, it will
472 * not be affected by anything you do with the pipe afterwards.
473 * Each end of a pipe can only be detched from it once (i.e.
474 * it is not duplicated).
475 *
476 * @param p pipe to detach an end from
477 * @param end which end of the pipe to detach
478 * @return Detached end on success, NULL on failure
479 * (or if that end is not present or is closed).
480 */
481struct GNUNET_DISK_FileHandle *
482GNUNET_DISK_pipe_detach_end (struct GNUNET_DISK_PipeHandle *p,
483 enum GNUNET_DISK_PipeEnd end);
484
485/**
470 * Close an open file. 486 * Close an open file.
471 * 487 *
472 * @param h file handle 488 * @param h file handle