diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-14 15:20:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-14 15:20:06 +0000 |
commit | ea03f11cfac38afdad7ea45b3a7787bd9b4f4711 (patch) | |
tree | f167b9eb1fe57eab105475cfc78555fde74a9fc8 /src/include/gnunet_disk_lib.h | |
parent | dbc46fb04fb3e1257b2473aee609c06c5b56f3c9 (diff) | |
download | gnunet-ea03f11cfac38afdad7ea45b3a7787bd9b4f4711.tar.gz gnunet-ea03f11cfac38afdad7ea45b3a7787bd9b4f4711.zip |
LRN: new pipe creation function GNUNET_DISK_pipe_from_fd to wrap existing file descriptor pair
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index fc2f01704..be92a91c6 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -399,6 +399,18 @@ GNUNET_DISK_pipe (int blocking, int inherit_read, int inherit_write); | |||
399 | 399 | ||
400 | 400 | ||
401 | /** | 401 | /** |
402 | * Creates a pipe object from a couple of file descriptors. | ||
403 | * Useful for wrapping existing pipe FDs. | ||
404 | * | ||
405 | * @param blocking creates an asynchronous pipe if set to GNUNET_NO | ||
406 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes | ||
407 | * | ||
408 | * @return handle to the new pipe, NULL on error | ||
409 | */ | ||
410 | struct GNUNET_DISK_PipeHandle * | ||
411 | GNUNET_DISK_pipe_from_fd (int blocking, int fd[2]); | ||
412 | |||
413 | /** | ||
402 | * Closes an interprocess channel | 414 | * Closes an interprocess channel |
403 | * @param p pipe | 415 | * @param p pipe |
404 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 416 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise |