setOptions method
Sets all options with the specified option type, removing all others of the same type.
Implementation
void setOptions(final Iterable<CoapOption> options) {
for (final opt in options) {
removeOptions(opt.type);
}
addOptions(options);
}