mirror of
https://github.com/deavmi/doap
synced 2024-07-04 15:10:11 +02:00
Packet
- `getByte()` now tacks on the calculated first byte - `getBytes()` encodes the rquest/response code now as well
This commit is contained in:
parent
d6a9f7d329
commit
3a3febc61e
|
@ -29,6 +29,10 @@ public class CoapPacket
|
|||
ubyte firstByte = cast(ubyte)(ver << 6);
|
||||
firstByte = firstByte | cast(ubyte)(type << 4);
|
||||
firstByte = firstByte | tokenLen;
|
||||
encoded ~= firstByte;
|
||||
|
||||
// Set the request/response code
|
||||
encoded ~= code;
|
||||
|
||||
return encoded;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user