From fb0ade9daf1e9d1cd0a29dd1abe87468ab03a174 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 22 Mar 2025 14:00:01 -0300 Subject: add relation type and format --- lib/server.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/server.ml') diff --git a/lib/server.ml b/lib/server.ml index 46ef85d..4a99b29 100644 --- a/lib/server.ml +++ b/lib/server.ml @@ -46,8 +46,7 @@ let client_read sock maxlen = }; ] in - return - @@ Xml.to_string (Protocol.facts_to_xml_light relation_result) + return @@ Xml.to_string (Protocol.facts_to_xml_light relation_result) | Error err -> return err [@@warning "-27"] @@ -56,8 +55,7 @@ let rec socket_read sock = Lwt_unix.accept sock >>= fun (client, _) -> client_read client 512 (* >>= fun results -> Lwt_unix.send client (Data_encoding.Binary.to_bytes_exn Data_encoding.Encoding.int32 5l) 0 1 [] *) - >>= - fun results -> + >>= fun results -> Lwt_unix.send client (Bytes.of_string results) 0 (String.length results) [] >>= fun _ -> Lwt_unix.wait_write client >>= fun () -> -- cgit v1.2.3