From a05bc3e2fd64e679decf90b54229367ba5b236be Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 26 Mar 2023 18:35:19 +0200 Subject: [PATCH] Manager - Added stub `sendMessage(TaggedMessage)` which will encode into the tristanable format, then wrap into bformat and send over the socket - Added import for `TaggedMessage` from `tristanable.encoding` module --- source/tristanable/manager/manager.d | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/tristanable/manager/manager.d b/source/tristanable/manager/manager.d index 64967be..6a1df27 100644 --- a/source/tristanable/manager/manager.d +++ b/source/tristanable/manager/manager.d @@ -7,6 +7,7 @@ import std.socket; import tristanable.queue : Queue; import core.sync.mutex : Mutex; import tristanable.manager.watcher : Watcher; +import tristanable.encoding : TaggedMessage; /** * Manages a provided socket by spawning @@ -68,6 +69,17 @@ public class Manager // TODO: Unlock queue } + + public void sendMessage(TaggedMessage tag) + { + // TODO: Send the given message + + // TODO: Encode into bytes; call it `x` + + // TODO: Wrap `x` in bformat; call it `y` + + // TODO: Do socket.send(`y`) + } }