From a0bb8fd4772630839e00bfec30bc9840985f241b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20=F0=9F=85=B1=2E=20Kildaire?= <21629986@sun.ac.za> Date: Thu, 24 Sep 2020 20:51:57 +0200 Subject: [PATCH] Added notifcation system --- source/tristanable/watcher.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/tristanable/watcher.d b/source/tristanable/watcher.d index f980ec4..27431fe 100644 --- a/source/tristanable/watcher.d +++ b/source/tristanable/watcher.d @@ -2,6 +2,7 @@ module tristanable.watcher; import tristanable.manager : Manager; import tristanable.request : Request; +import tristanable.notifications : NotificationReply; import std.socket : Socket; import core.thread : Thread; import bmessage : receiveMessage; @@ -91,7 +92,14 @@ public final class Watcher : Thread */ else if(manager.isReservedTag(receivedTag)) { - /* TODO: Implement me */ + /* Lock the notification queue */ + manager.lockNotificationQueue(); + + /* Create the NotificationReply */ + NotificationReply notifyReply = new NotificationReply(receivedTag, receivedMessage); + + /* Unlock the notification queue */ + manager.unlockNotificationQueue(); } else {