NZSmartie / CoAP.Net

Constrained Applciaiton Protocol (CoAP) [RFC7252] for .Net Standard
https://nzsmartie.co.nz/CoAP.Net/
Apache License 2.0
34 stars 11 forks source link

Fix placeholder option logic #26

Open avertes-vv opened 1 year ago

avertes-vv commented 1 year ago

OptionFactory has a placeholder option to give the application chance at reading options, but it doesn't actually work as maxLength defaults to 0.

I gave placeholder option a maxLength of ushort.MaxValue. I realize it would be even better to be able to configure whether options are allowed at all and to configure maximum length for options. But with this fix it at least has a change of reading options.