sniffing function added

This commit is contained in:
/jdi/ 2015-09-26 14:02:24 +02:00
parent 699ff4221d
commit 671a9df9d7
5 changed files with 47 additions and 11 deletions

View file

@ -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) {