aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dune-project16
-rw-r--r--portal-tcp.opam37
-rw-r--r--portal/tcp/dune2
-rw-r--r--portal/tcp/portal.ml (renamed from portal/tcp/portal_tcp.ml)0
-rw-r--r--test/native/native_hello.ml6
5 files changed, 58 insertions, 3 deletions
diff --git a/dune-project b/dune-project
index 8a2260d..6adc22f 100644
--- a/dune-project
+++ b/dune-project
@@ -65,4 +65,20 @@ In turn, the Portal module can implement various transports to XMPP (WebSockets,
(tags
(xmpp flesh portal websockets lwt)))
+(package
+ (name portal-tcp)
+ (synopsis "Plain TCP XMPP portal")
+ (description "This library implements an XMPP Portal for plain TCP.
+
+This package sends your credential over unsecured plaintext wire.
+
+You should probably not use this unless you know what you're doing.")
+ (depends
+ ocaml
+ dune
+ (merlin :with-test)
+ (utop :with-test))
+ (tags
+ (xmpp flesh portal tcp lwt)))
+
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
diff --git a/portal-tcp.opam b/portal-tcp.opam
new file mode 100644
index 0000000..d9358e5
--- /dev/null
+++ b/portal-tcp.opam
@@ -0,0 +1,37 @@
+# This file is generated by dune, edit dune-project instead
+opam-version: "2.0"
+synopsis: "Plain TCP XMPP portal"
+description: """
+This library implements an XMPP Portal for plain TCP.
+
+This package sends your credential over unsecured plaintext wire.
+
+You should probably not use this unless you know what you're doing."""
+maintainer: ["Clombrong"]
+authors: ["Clombrong"]
+license: "LGPL-3.0-or-later"
+tags: ["xmpp" "flesh" "portal" "tcp" "lwt"]
+homepage: "https://forge.fsky.io/clombrong/flesh"
+bug-reports: "https://forge.fsky.io/clombrong/flesh/issues"
+depends: [
+ "ocaml"
+ "dune" {>= "3.11"}
+ "merlin" {with-test}
+ "utop" {with-test}
+ "odoc" {with-doc}
+]
+build: [
+ ["dune" "subst"] {dev}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@runtest" {with-test}
+ "@doc" {with-doc}
+ ]
+]
+dev-repo: "git+https://forge.fsky.io/clombrong/flesh.git"
diff --git a/portal/tcp/dune b/portal/tcp/dune
index 40fa592..2d87bfe 100644
--- a/portal/tcp/dune
+++ b/portal/tcp/dune
@@ -1,3 +1,5 @@
(library
(name portal_tcp)
+ (implements portal)
+ (public_name portal-tcp)
(libraries lwt lwt.unix markup markup-lwt))
diff --git a/portal/tcp/portal_tcp.ml b/portal/tcp/portal.ml
index 32ff507..32ff507 100644
--- a/portal/tcp/portal_tcp.ml
+++ b/portal/tcp/portal.ml
diff --git a/test/native/native_hello.ml b/test/native/native_hello.ml
index ad6c6b4..f2d1546 100644
--- a/test/native/native_hello.ml
+++ b/test/native/native_hello.ml
@@ -1,5 +1,5 @@
open! Lwt.Syntax
-open! Portal_tcp
+open! Portal
let () =
Lwt_main.run @@
@@ -7,6 +7,6 @@ let () =
and _password = Sys.getenv "FLESH_PASSWORD"
in let domain = (List.nth (String.split_on_char '@' jid) 1)
in let* stream, push = connect domain
- in Portal_tcp.stanza_open domain |> Option.some |> push;
+ in Portal.stanza_open domain |> Option.some |> push;
let+ _s = Markup_lwt.next stream
- in Portal_tcp.stanza_close |> Option.some |> push;
+ in Portal.stanza_close |> Option.some |> push;