sniffing function added
This commit is contained in:
parent
699ff4221d
commit
671a9df9d7
5 changed files with 47 additions and 11 deletions
|
|
@ -163,7 +163,12 @@ void Packet::encode(bytes &data) {
|
|||
}
|
||||
|
||||
void Packet::push(bytes &arr, int &index, byte data) {
|
||||
arr[index++] = data;
|
||||
if (arr.size() > index) {
|
||||
arr[index++] = data;
|
||||
} else {
|
||||
arr.push_back(data);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
void Packet::push(bytes &arr, int &index, bytes data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue