aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-08-17 17:19:26 +0200
committerClombrong <cromblong@egregore.fun>2025-08-17 17:19:26 +0200
commit426ea69bcd708b2ecf0ec6555059de02125b3d68 (patch)
tree3f4b386d85a58c9cdbf8b06f95a4ccb2f8fad6a3
parente3bfb6e8dc508b1af0e3c10db3dadac6f2d25143 (diff)
feat(portal): make stream and push immutable
-rw-r--r--portal/portal.mli4
-rw-r--r--portal/tcp/portal.ml4
-rw-r--r--portal/ws/portal.ml4
3 files changed, 6 insertions, 6 deletions
diff --git a/portal/portal.mli b/portal/portal.mli
index 0d3003c..55cea74 100644
--- a/portal/portal.mli
+++ b/portal/portal.mli
@@ -17,8 +17,8 @@ val domain_to_string : domain -> string
[push None] closes the XMPP stream and disconnects the underlying [_socket]. This is
how XMPP connections should be ended. *)
type t = {
- mutable stream : (signal, async) stream;
- mutable push : (signal, sync) stream option -> unit;
+ stream : (signal, async) stream;
+ push : (signal, sync) stream option -> unit;
mutable _socket : socket;
}
diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml
index 48d0571..d84c9e6 100644
--- a/portal/tcp/portal.ml
+++ b/portal/tcp/portal.ml
@@ -19,8 +19,8 @@ type 'a sock = {
type socket = Plain of Lwt_unix.file_descr sock | Tls of Tls_lwt.Unix.t sock
type t = {
- mutable stream : (signal, async) stream;
- mutable push : (signal, sync) stream option -> unit;
+ stream : (signal, async) stream;
+ push : (signal, sync) stream option -> unit;
mutable _socket : socket;
}
diff --git a/portal/ws/portal.ml b/portal/ws/portal.ml
index 5afd725..5da3117 100644
--- a/portal/ws/portal.ml
+++ b/portal/ws/portal.ml
@@ -23,8 +23,8 @@ let domain_of_string (s : string) : domain = s
let domain_to_string (s : domain) : string = s
type t = {
- mutable stream : (signal, async) stream;
- mutable push : (signal, sync) stream option -> unit;
+ stream : (signal, async) stream;
+ push : (signal, sync) stream option -> unit;
mutable _socket : socket;
}