class CoAP::Message
- CoAP::Message
- CoAP::Header
- BinData
- Reference
- Object
Overview
https://tools.ietf.org/html/rfc7252#section-3
Defined in:
coap/message.crConstant Summary
-
ENDIAN =
["big"]
-
https://tools.ietf.org/html/rfc7252#section-3
-
KLASS_NAME =
[CoAP::Message]
-
https://tools.ietf.org/html/rfc7252#section-3
-
PARTS =
[{type: "bitfield", name: 2, cls: CoAP::Message, onlyif: nil, verify: nil}, {type: "basic", name: message_id, cls: UInt16, onlyif: nil, verify: nil, value: nil}, {type: "bytes", name: token, cls: Bytes, onlyif: nil, verify: nil, length: -> do token_length end, value: nil}, {type: "variable_array", name: raw_options, cls: Option, onlyif: nil, verify: nil, length: -> do if opt = raw_options[-1]? !opt.end_of_options? else if remaining = io.peek remaining.size > 0 else false end end end, value: nil}, {type: "bytes", name: payload_data, cls: Bytes, onlyif: nil, verify: nil, length: -> do io.peek.try(&.size) || 0 end, value: nil}] of Nil
-
https://tools.ietf.org/html/rfc7252#section-3
-
REMAINING =
[] of Nil
-
https://tools.ietf.org/html/rfc7252#section-3
Class Method Summary
-
.bit_fields
https://tools.ietf.org/html/rfc7252#section-3
Instance Method Summary
- #__format__ : IO::ByteFormat
-
#code_class : CodeClass
https://tools.ietf.org/html/rfc7252#section-12.1
-
#code_class=(code_class : UInt8)
https://tools.ietf.org/html/rfc7252#section-12.1
-
#code_class=(value : CodeClass)
https://tools.ietf.org/html/rfc7252#section-12.1
-
#code_detail : UInt8
When code_class above == Method then this indicates if it's a GET POST etc
-
#code_detail=(code_detail : UInt8)
When code_class above == Method then this indicates if it's a GET POST etc
- #message_id : UInt16
- #message_id=(message_id : UInt16)
- #method
-
#options : Array(Option)
https://tools.ietf.org/html/rfc7252#section-12.2
-
#options=(values : Enumerable(Option))
allow for reasonablly flexible header parsing
- #payload_data : Bytes
- #payload_data=(payload_data : Bytes)
- #raw_options : Array(Option)
- #raw_options=(raw_options : Array(Option))
-
#status
These do actually differ slightly from the HTTP originals https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#response-codes
- #status=(value : Int | HTTP::Status)
- #status_code
- #status_code=(value : Int | HTTP::Status)
- #success?
- #token : Bytes
- #token=(token : Bytes)
Macro Summary
-
co_ap_header(name, onlyif = nil, verify = nil, value = nil)
https://tools.ietf.org/html/rfc7252#section-3
-
co_ap_message(name, onlyif = nil, verify = nil, value = nil)
https://tools.ietf.org/html/rfc7252#section-3
-
co_ap_option(name, onlyif = nil, verify = nil, value = nil)
https://tools.ietf.org/html/rfc7252#section-3
Instance methods inherited from class CoAP::Header
__format__ : IO::ByteFormat
__format__,
token_length : UInt8
token_length,
token_length=(token_length : UInt8)
token_length=,
type : Type
type,
type=(type : UInt8)type=(value : Type) type=, version : UInt8 version, version=(version : UInt8) version=
Class methods inherited from class CoAP::Header
bit_fields
bit_fields
Class Method Detail
Instance Method Detail
When code_class above == Method then this indicates if it's a GET POST etc
When code_class above == Method then this indicates if it's a GET POST etc
allow for reasonablly flexible header parsing
These do actually differ slightly from the HTTP originals https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#response-codes
Macro Detail
https://tools.ietf.org/html/rfc7252#section-3
https://tools.ietf.org/html/rfc7252#section-3
https://tools.ietf.org/html/rfc7252#section-3