CoapClient

- Made `address` package-accessible

CoapMessagingLayer

- Added `getEndpointAddress()` which returns the associated `CoapClient`'s address
This commit is contained in:
Tristan B. Velloza Kildaire 2023-09-22 16:56:48 +02:00
parent a28166dcb1
commit 0fb0149d9d
2 changed files with 7 additions and 1 deletions

View File

@ -17,7 +17,7 @@ public class CoapClient
/**
* CoAP server endpoint
*/
private Address address;
package Address address;
/**
* Running status

View File

@ -11,6 +11,7 @@ import doap.client.request : CoapRequest;
import std.stdio;
import std.socket : Socket, SocketSet;
import std.socket : Address;
// TODO: Generalize this and then make
// ... a UDP version of it
@ -42,6 +43,11 @@ class CoapMessagingLayer : Thread
this.client = client;
}
public final Address getEndpointAddress()
{
return this.client.address;
}
/**
* Reading loop which reads datagrams
* from the socket