//encode
CoapPacket coapPacket = new CoapPacket();
coapPacket.setCode(Code.C205_CONTENT);
coapPacket.setPayload("{}");
coapPacket.headers().setContentFormat(MediaTypes.CT_TEXT_PLAIN);
coapPacket.writeTo(outputStream);
//decode
CoapPacket packet = CoapPacket.deserialize(inputStream);
packet.headers();
packet.getPayloadString();
-
Notifications
You must be signed in to change notification settings - Fork 29
jetlinks/coap-codec
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
coap编解码器
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published