Skip to content

Commit 5ad11c9

Browse files
committed
separator char
1 parent 12f131c commit 5ad11c9

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,28 @@ PATH\n
1616
[B\n BODY]
1717
```
1818

19-
### VERSION
19+
### SEPARATOR char
20+
21+
SEPARATOR char serves to divide pieces of information
22+
23+
* Type: `char` | `byte` | `uint8_t`
24+
* Size: 1 byte
25+
* Constant:
26+
* char: `\n`
27+
* hex: `0xA`
28+
* decimal: `10`
29+
30+
### [0] VERSION
2031

2132
Version is the version of iot protocol. Used for compatibility.
2233

2334
* Type: `byte` | `uint8_t`. **REQUIRED**
2435
* Size: 1 byte
2536
* Example: `1`
2637

27-
### METHOD_ID
38+
### [1] METHOD+ID
2839

29-
Method ID: METHOD+ID.
40+
Method ID identifies the method of request and its id.
3041

3142
Methods:
3243

@@ -47,7 +58,7 @@ Unsigned random number with up to 2^16 that identifies the request.
4758
* Size: 2 bytes
4859
* Example: `1822`
4960

50-
### PATH
61+
### [2] PATH
5162

5263
The path component contains data, usually organized in hierarchical
5364
form, that, serves to identify a resource [URI > 3.3 Path](https://www.rfc-editor.org/info/rfc3986).
@@ -56,18 +67,18 @@ form, that, serves to identify a resource [URI > 3.3 Path](https://www.rfc-edito
5667
* Example: `/foo/bar`
5768
* Default: `/`
5869

59-
### HEADERS
70+
### [3] HEADERS
6071

61-
Key Value Pair joined by `:` char, that, serves to set an attribute value for the request. Multiple headers must be separate para SEPARATOR char (`\n`).
72+
Key Value Pair joined by `:` char, that, serves to set an attribute value for the request. Multiple headers must be separate by SEPARATOR char (`\n`).
6273

6374
* Type: `Map<string, string>`. **OPTIONAL**
6475
* Example:
65-
* Single header: `foo:bar`
66-
* Multiple headers: `foo:bar\nlorem:ipsum`
76+
* Single header: `foo:bar\n`
77+
* Multiple headers: `foo:bar\nlorem:ipsum\n`
6778

68-
### BODY
79+
### [4] BODY
6980

70-
The final data to be used for request receiver. Starts with `B\n`.
81+
The final data to be sent for request receiver. Starts with `B\n`.
7182

7283
* Type: `uint8_t[]`
7384
* Example:

0 commit comments

Comments
 (0)