From faa9bc1bc1ddbdc48bd119920f8dd4ec5272f852 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Fri, 22 Sep 2023 17:49:10 +0200 Subject: [PATCH] CoapMessagingLayerFR - Added method `getEndpointAddress()` --- source/doap/client/mesglayer.d | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/doap/client/mesglayer.d b/source/doap/client/mesglayer.d index 3ded49e..796d20b 100644 --- a/source/doap/client/mesglayer.d +++ b/source/doap/client/mesglayer.d @@ -1,6 +1,7 @@ module doap.client.mesglayer; import doap.client.client : CoapClient; +import std.socket : Address; public abstract class CoapMessagingLayerFR { @@ -31,4 +32,15 @@ public abstract class CoapMessagingLayerFR { return this.client; } + + /** + * Retrieves the CoAP endpoint the client is + * connected to + * + * Returns: the endpoint address + */ + protected final Address getEndpointAddress() // Final in Interface + { + return this.client.address; + } } \ No newline at end of file