summaryrefslogtreecommitdiffstats
path: root/src/H5FDstream.h
diff options
context:
space:
mode:
authorThomas Radke <tradke@aei.mpg.de>2000-09-15 11:35:39 (GMT)
committerThomas Radke <tradke@aei.mpg.de>2000-09-15 11:35:39 (GMT)
commit5a4c55b42c8123e69f85be7fa75740fa428b2deb (patch)
tree000b22e59f6c1677a2cccafcb924ee9d7387b0ed /src/H5FDstream.h
parent55bd85f6e531e230958e635b7bebee08b2b3db93 (diff)
downloadhdf5-5a4c55b42c8123e69f85be7fa75740fa428b2deb.zip
hdf5-5a4c55b42c8123e69f85be7fa75740fa428b2deb.tar.gz
hdf5-5a4c55b42c8123e69f85be7fa75740fa428b2deb.tar.bz2
[svn-r2555] Purpose:
Added source files for the Stream Virtual File Driver. Description: The Stream VFD allows users to stream complete HDF5 files via socket connections between different applications. Files which were created anew are flushed to any connected client on each H5Fflush() or H5Fclose() operation. Files which are opened as read-only will be read from a socket on a H5Fopen() call. The driver's H5FDset_fapl_stream() routine allows to pass in several parameters such as an external socket descriptor, some socket options, and flags for broadcasting a received file. If an external socket is provided the Stream VFD would use that for the socket calls. Otherwise it parses the filename argument in H5Fcreate()/H5Fopen() for a 'hostname::port' parameter. All files processed by the Stream VFD are kept in memory (same way as the core VFD does). Platforms: Tested so far under Linux, Irix 32/64bit, OSF1, Solaris, Cray Unicos, Hitachi SR8000, IBM AIX. Not tested under Windows yet.
Diffstat (limited to 'src/H5FDstream.h')
-rw-r--r--src/H5FDstream.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/H5FDstream.h b/src/H5FDstream.h
new file mode 100644
index 0000000..c8acd65
--- /dev/null
+++ b/src/H5FDstream.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright © 2000 The author.
+ * The author prefers this code not be used for military purposes.
+ *
+ *
+ * Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
+ * Tuesday, September 12, 2000
+ *
+ * Purpose: The public header file for the Stream Virtual File Driver.
+ */
+#ifndef H5FDstream_H
+#define H5FDstream_H
+
+#ifdef H5_HAVE_STREAM
+
+#include <H5Ipublic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define H5FD_STREAM (H5FD_stream_init())
+
+/* prototype for read broadcast callback routine */
+typedef int (*H5FD_stream_broadcast_t) (unsigned char **file,
+ haddr_t *len,
+ void *arg);
+
+/* Driver-specific file access properties */
+typedef struct H5FD_stream_fapl_t
+{
+ size_t increment; /* how much to grow memory in reallocs */
+ int socket; /* external socket descriptor */
+ hbool_t do_socket_io; /* do I/O on socket */
+ unsigned int backlog; /* backlog argument for listen call */
+ H5FD_stream_broadcast_t broadcast_fn; /* READ broadcast callback */
+ void *broadcast_arg; /* READ broadcast callback user argument*/
+} H5FD_stream_fapl_t;
+
+
+__DLL__ hid_t H5FD_stream_init (void);
+__DLL__ herr_t H5Pset_fapl_stream (hid_t fapl_id,
+ H5FD_stream_fapl_t *fapl);
+__DLL__ herr_t H5Pget_fapl_stream (hid_t fapl_id,
+ H5FD_stream_fapl_t *fapl /*out*/ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H5_HAVE_STREAM */
+
+#endif /* H5FDstream_H */