rename 'data' structure into 'message'
This commit is contained in:
parent
f917275cbc
commit
2a7311e10f
12
README.md
12
README.md
|
@ -78,12 +78,12 @@ struct discover {
|
|||
The `data` format is sent by nodes to submit messagesca to the well.
|
||||
|
||||
```c++
|
||||
struct data {
|
||||
uint8_t opcode; // opcode = 1
|
||||
uint8_t dist; // distance of the last sender
|
||||
uint8_t ttl; // time to live default = 10
|
||||
uint8_t size; // size of message in bytes
|
||||
uint8_t message[]; // actual message
|
||||
struct message {
|
||||
uint8_t opcode; // opcode = 1
|
||||
uint8_t dist; // distance of the last sender
|
||||
uint8_t ttl; // time to live default = 10
|
||||
uint8_t size; // size of message in bytes
|
||||
uint8_t data[]; // actual message
|
||||
};
|
||||
```
|
||||
|
||||
|
|
14
protocol.h
14
protocol.h
|
@ -12,12 +12,12 @@
|
|||
};
|
||||
|
||||
|
||||
struct data {
|
||||
uint8_t opcode; // opcode = 1
|
||||
uint8_t dist; // distance of the last sender
|
||||
uint8_t ttl; // time to live default = 10
|
||||
uint8_t size; // size of message in bytes
|
||||
uint8_t message[]; // actual message
|
||||
struct message {
|
||||
uint8_t opcode; // opcode = 1
|
||||
uint8_t dist; // distance of the last sender
|
||||
uint8_t ttl; // time to live default = 10
|
||||
uint8_t size; // size of message in bytes
|
||||
uint8_t data[]; // actual message
|
||||
};
|
||||
|
||||
// A <node> object is held by each node which values are determined thanks
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
// update the current node according to a (received)
|
||||
// discover request
|
||||
bool update(struct discover req);
|
||||
bool update(struct discover dsc);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue