- 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
- You can now call `con()` to make the message confirmable
- You can now call `non()` to make the message non-confirmable
- Messages are now by default confirmable
- Added `RequestState` enum
- State if `CREATED` on construction
- Calling `receiveWake(CoapPacket)` now sets the state to `COMPLETED`
- Calling `cancel()` now sets the state to `CANCELLED`
- Fixed problem where multiple threads calling `get()` would not all be woken up on the completion of the future due to usage of `notify()` instead of `notifyAll()`
- Removed the `Socket` instance
- `init()` now calls `begin()` on the messaging layer and no longer creates a new `Socket` itself
- `close()` now just calls `close()` on the messaging layer
- `transmitRequest(CoapRequest)` now calls `send(CoapPacket)` on the messaging layer instead of via a socket's `send(ubyte[])`
CoapMessagingLayer
- Added a `running` flag
- Added `begin()` which sets the running flag (ours) to `true`, it then creates and opens a `Socket` and then starts the reading loop
- Added `send(CoapPacket)` whcih wire-encoded the packet and then sends it over our `Socket`
- Added `close()` which sets the running flag to false, shutsdown the `Socket` (unblocking any blocking receives) and then closes the `Socket` (releasing the bound datagram port)
- Removed references to the `CoapClient`'s now-non-existent `Socket`
- Removed `getAndReset()`, replaced it with `hasTimedOut(Duration)`
CoapClient
- The `watch()` now uses `CoapRequest`'s new `hasTimedOut(Duration)` method
- Added a `Condition` variable for the `requestsLock` mutex
- Added `transmitRequest(CoapRequest request)` which will take in the `CoapRequest`, yank the `CoapPacket` from it, encode it, send it over the underlying transport and then start the request's timer
- Added some code for a future "watcher" routine
CoapRequest
- Added a `StopWatch` timer which does not auto start
- Added `startTime()` which starts the timer
- Added `getAndReset()` which gets the elapsed time and resets it
- Now takes in the original request packet, `CoapPacket` instead of the token
- Added `getToken()` to fetch the token (for matching purposes)
- Added `getRequestPacket()` to obtain the original request
CoapClient
- Use `getToken()`
- Pass the `CoapPacket` in rather