summaryrefslogtreecommitdiffstats
path: root/byterun/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/io.h')
-rw-r--r--byterun/io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/byterun/io.h b/byterun/io.h
index 169ad37d6..a35124ac9 100644
--- a/byterun/io.h
+++ b/byterun/io.h
@@ -47,9 +47,14 @@ struct channel {
int revealed; /* For Cash only */
int old_revealed; /* For Cash only */
int refcount; /* For flush_all and for Cash */
+ int flags; /* Bitfield */
char buff[IO_BUFFER_SIZE]; /* The buffer itself */
};
+enum {
+ CHANNEL_FLAG_FROM_SOCKET = 1, /* For Windows */
+};
+
/* For an output channel:
[offset] is the absolute position of the beginning of the buffer [buff].
For an input channel:
@@ -73,6 +78,7 @@ CAMLextern struct channel * caml_open_descriptor_in (int);
CAMLextern struct channel * caml_open_descriptor_out (int);
CAMLextern void caml_close_channel (struct channel *);
CAMLextern int caml_channel_binary_mode (struct channel *);
+CAMLextern value caml_alloc_channel(struct channel *chan);
CAMLextern int caml_flush_partial (struct channel *);
CAMLextern void caml_flush (struct channel *);