тестовая проверка трафика

This commit is contained in:
Alexey Kasyanchuk
2017-08-24 09:26:03 +03:00
parent 69a2ad1c54
commit 716c820e5b
2 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,10 @@ class Client extends Emiter
socket.destroy();
});
socket.on('data', (data) => {
this.emit('traffic', data.length);
})
socket.on('timeout', (err) => {
socket.destroy();
});