CoapMessagingLayerFR

- Added abstract methods `begin()`, `send(CoapPacket)` and `close()`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-09-22 17:51:20 +02:00
parent faa9bc1bc1
commit 8fa139b038

View File

@ -2,6 +2,7 @@ module doap.client.mesglayer;
import doap.client.client : CoapClient;
import std.socket : Address;
import doap.protocol.packet : CoapPacket;
public abstract class CoapMessagingLayerFR
{
@ -43,4 +44,23 @@ public abstract class CoapMessagingLayerFR
{
return this.client.address;
}
/**
* Starts the messaging layer
*/
public abstract void begin();
/**
* Transmit the provided packet
*
* Params:
* packet = the `CoapPacket`
* to transmit
*/
public abstract void send(CoapPacket packet);
/**
* Stops the messaging layer
*/
public abstract void close();
}