mirror of
https://github.com/deavmi/doap
synced 2024-07-04 16:10:15 +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,7 +29,11 @@ public class CoapPacket
|
||||||
ubyte firstByte = cast(ubyte)(ver << 6);
|
ubyte firstByte = cast(ubyte)(ver << 6);
|
||||||
firstByte = firstByte | cast(ubyte)(type << 4);
|
firstByte = firstByte | cast(ubyte)(type << 4);
|
||||||
firstByte = firstByte | tokenLen;
|
firstByte = firstByte | tokenLen;
|
||||||
|
encoded ~= firstByte;
|
||||||
|
|
||||||
|
// Set the request/response code
|
||||||
|
encoded ~= code;
|
||||||
|
|
||||||
return encoded;
|
return encoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user