We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30a9cf8 commit 1fac84bCopy full SHA for 1fac84b
lib/src/binding_coap/coap_definitions.dart
@@ -55,4 +55,15 @@ enum CoapRequestMethod {
55
enum CoapSubprotocol {
56
/// Subprotocol for observing CoAP resources.
57
observe,
58
+ ;
59
+
60
+ /// Tries to match the given [subprotocol] string to one of the known
61
+ /// [CoapSubprotocol.values].
62
+ static CoapSubprotocol? tryParse(String subprotocol) {
63
+ if (subprotocol == "cov:observe") {
64
+ return CoapSubprotocol.observe;
65
+ }
66
67
+ return null;
68
69
}
0 commit comments