embed parsed packet in console
This commit is contained in:
parent
7f6e946c2b
commit
e8f8d89aa8
1 changed files with 2 additions and 2 deletions
|
@ -72,15 +72,15 @@ export default class StreamingClient extends NanoEvents {
|
|||
}
|
||||
|
||||
ws.onmessage = ({ data }) => {
|
||||
log(`recv: ${data}`)
|
||||
const packet = JSON.parse(data)
|
||||
log('recv:', packet)
|
||||
|
||||
this.emit('packet', packet)
|
||||
this.handle(packet)
|
||||
}
|
||||
|
||||
ws.onerror = (err) => {
|
||||
log(`error: ${err}`)
|
||||
log('error:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue