mirror of https://github.com/deavmi/doap
Merge branch 'master' into feature/cancellable_future
This commit is contained in:
commit
3faa9a0f56
|
@ -89,6 +89,10 @@ public class CoapPacket
|
|||
}
|
||||
|
||||
// FIXME: Add options encoding
|
||||
foreach(CoapOption option; orderOptions())
|
||||
{
|
||||
encoded ~= encodeOption(option);
|
||||
}
|
||||
|
||||
// Set the payload marker
|
||||
encoded ~= PAYLOAD_MARKER;
|
||||
|
@ -99,6 +103,20 @@ public class CoapPacket
|
|||
return encoded;
|
||||
}
|
||||
|
||||
// TODO: Make public in the future
|
||||
private static ubyte[] encodeOption(CoapOption option)
|
||||
{
|
||||
// TODO: Implement this
|
||||
return [];
|
||||
}
|
||||
|
||||
private CoapOption[] orderOptions()
|
||||
{
|
||||
// TODO: Implement ordering here
|
||||
return this.options;
|
||||
}
|
||||
|
||||
|
||||
public void setType(MessageType type)
|
||||
{
|
||||
this.type = type;
|
||||
|
|
Loading…
Reference in New Issue