diff options
author | Clombrong <clombrong@egregore.fun> | 2025-05-09 13:36:52 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-05-09 13:36:52 +0200 |
commit | 8998418ea69d7911a23c71d53be34f2017e33df5 (patch) | |
tree | 5a6a750841905a0bbacce99ce5b119791bbc4543 | |
parent | bb7784eca20d52d2c2a46ac5c301da02d09d57ae (diff) |
fix(portal_ws): remove buffer
-rw-r--r-- | portal/lib/portal_ws.ml | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/portal/lib/portal_ws.ml b/portal/lib/portal_ws.ml index ecbbe60..075f1d4 100644 --- a/portal/lib/portal_ws.ml +++ b/portal/lib/portal_ws.ml @@ -92,16 +92,6 @@ let connect domain = let open Lwt_stream in let+ stream, ws_push = ws_endpoint domain >|= ws_stream in let streamed_stanzas, push = create () in - let open Stdlib.Buffer in - let buf = create 1024 in (* NOTE: placeholder, ideally this should be the ~size of an XMPP stanza *) - let _send_frame () = - (* We create a buffer a single time, and clear it for every generated WebSocket frame. *) - Some (contents buf) |> ws_push; - clear buf - and _close_stream () = - Some stanza_close |> ws_push; - ws_push None; - in (* Consumes a stream of stanzas fragments into a series of frames sent to the WebSocket. *) (* Right now... This doesn't do much. *) let to_frames fragments = |