CasperX
CasperX
HHono
Created by moroshko on 10/25/2024 in #help
How to perform an async operation in Web Socket's onMessage?
i think you could do something like this
onMessage(event, ws) {
// do async stuff here
const innner = async () => {
// do something
await Bun.sleep(10);
// do something else
}
inner()
}
onMessage(event, ws) {
// do async stuff here
const innner = async () => {
// do something
await Bun.sleep(10);
// do something else
}
inner()
}
2 replies