CoAP library for D
Go to file
Tristan B. Velloza Kildaire 4f1f843d43 CoapPacket
- Added stub `orderOptions()` type which will re-order the current options and then return a new re-ordered array for encoding properly
- Added stub `encodeOption(CoapOption)` which returns the encoded option as a `ubyte[]`
- `getBytes()` has stub code to call `orderOption()`, iterate over itsm items and call `encodeOption()` on each
2023-09-24 23:57:26 +02:00
.github/workflows Update d.yml 2023-09-18 14:00:34 +02:00
branding Branding 2023-09-22 18:46:18 +02:00
source/doap CoapPacket 2023-09-24 23:57:26 +02:00
.gitignore - Fixed .gitignore 2023-09-11 21:37:05 +02:00
dub.json Dub 2023-09-11 21:36:19 +02:00
LICENSE - Added LICENSE 2023-09-12 18:39:35 +02:00
README.md README 2023-09-22 18:51:24 +02:00

doap

D

doap is a CoAP library for the D programming language.

Usage

Documentation is available here.

Making a request

CoapClient client = new CoapClient("coap.me", 5683);
    
CoapRequestFuture future = client.newRequestBuilder()
                        .payload(cast(ubyte[])"Hello this is Tristan!")
                        .token([69])
                        .post();


writeln("Future start");
CoapPacket response  = future.get();
writeln("Future done");
writeln("Got response: ", response);

client.close();

License

This project is licensed under the LGPL v3.0.