aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stream.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index 1363352..6e4829b 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -8,6 +8,10 @@ type auth_mechanism =
| PLAIN
| Unknown of string [@@deriving show { with_path = false }]
+let parse_auth_mechanism = function
+ | "PLAIN" -> PLAIN
+ | other -> Unknown other
+
let get (stream : (signal, async) stream) : (signal, sync) stream Lwt.t =
(** [stanza stream] is a promise containing a full stanza of the fragments of
[stream]. *)