docs: add project description and server setup instructions to README
This commit is contained in:
10
esp/microcoapy/coap_option.py
Normal file
10
esp/microcoapy/coap_option.py
Normal file
@@ -0,0 +1,10 @@
|
||||
class CoapOption:
|
||||
def __init__(self, number=-1, buffer=None):
|
||||
self.number = number
|
||||
byteBuf = bytearray()
|
||||
if buffer is not None:
|
||||
if isinstance(buffer, str):
|
||||
byteBuf.extend(buffer.encode("utf-8"))
|
||||
else:
|
||||
byteBuf.extend(buffer)
|
||||
self.buffer = byteBuf
|
||||
Reference in New Issue
Block a user