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