mirror of
https://github.com/deavmi/doap
synced 2024-07-04 13:50:51 +02:00
CoapClient
- Made `address` package-accessible CoapMessagingLayer - Added `getEndpointAddress()` which returns the associated `CoapClient`'s address
This commit is contained in:
parent
a28166dcb1
commit
0fb0149d9d
|
@ -17,7 +17,7 @@ public class CoapClient
|
||||||
/**
|
/**
|
||||||
* CoAP server endpoint
|
* CoAP server endpoint
|
||||||
*/
|
*/
|
||||||
private Address address;
|
package Address address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Running status
|
* Running status
|
||||||
|
|
|
@ -11,6 +11,7 @@ import doap.client.request : CoapRequest;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
|
||||||
import std.socket : Socket, SocketSet;
|
import std.socket : Socket, SocketSet;
|
||||||
|
import std.socket : Address;
|
||||||
|
|
||||||
// TODO: Generalize this and then make
|
// TODO: Generalize this and then make
|
||||||
// ... a UDP version of it
|
// ... a UDP version of it
|
||||||
|
@ -42,6 +43,11 @@ class CoapMessagingLayer : Thread
|
||||||
this.client = client;
|
this.client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final Address getEndpointAddress()
|
||||||
|
{
|
||||||
|
return this.client.address;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reading loop which reads datagrams
|
* Reading loop which reads datagrams
|
||||||
* from the socket
|
* from the socket
|
||||||
|
|
Loading…
Reference in New Issue
Block a user