CoapUri
class CoapUri(val scheme: CoapScheme, val host: String, val port: Int = scheme.defaultPort, pathSegments: List<String> = emptyList(), querySegments: List<String> = emptyList())(source)
A CoAP URI (RFC 7252 §6, RFC 8323 §8) and its mapping to request options.
parse follows the decomposition algorithm of RFC 7252 §6.4 and toString the composition of §6.5, so CoapUri.parse(s).toString() normalizes s. parse is for URIs the application supplies and throws on a malformed one; a URI a peer supplied goes through parseOrNull, which never throws.
Constructors
Properties
Link copied to clipboard
True for IPv4 and IPv6 literals, which RFC 7252 §6.4 step 5 sends without a Uri-Host option.
Link copied to clipboard
Decoded Uri-Path values; an empty list is the root path. A copy of the list given.
Link copied to clipboard
Decoded Uri-Query values. A copy of the list given.
Link copied to clipboard