aboutsummaryrefslogtreecommitdiff
path: root/lib/stream.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stream.ml')
-rw-r--r--lib/stream.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index 677b60d..b26d02f 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -4,6 +4,9 @@ exception ClosedStream
exception InvalidStanza of string
let get stream =
+ (** [get stream] returns a promise containing an element of [stream].
+
+ If [stream] is closed, it throws a ClosedStream Lwt exception. *)
let* stanza = Lwt_stream.get stream
in match stanza with
| Some stanza -> Lwt.return stanza