From 4c788b91c301fa9e6b13f837805bfc46d90fbcbf Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 25 Sep 2023 19:41:29 +0200 Subject: [PATCH] CoapClient - Added rolling counter and a lock for it - Count starts at 0 --- source/doap/client/client.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/doap/client/client.d b/source/doap/client/client.d index 9659980..c016378 100644 --- a/source/doap/client/client.d +++ b/source/doap/client/client.d @@ -45,6 +45,12 @@ public class CoapClient */ private Condition watcherSignal; + /** + * Rolling Message ID + */ + private ulong rollingMid; + private Mutex rollingLock; + /** * Creates a new CoAP client to the * provided endpoint address @@ -62,6 +68,9 @@ public class CoapClient this.requestsLock = new Mutex(); this.watcherSignal = new Condition(this.requestsLock); + this.rollingMid = 0; + this.rollingLock = new Mutex(); + init(); }