CC: Tweaked

CC: Tweaked

42M Downloads

Return the close code and message from `Websocket.receive`

zyxkad opened this issue ยท 1 comments

commented

now the websocket.receive will only return a possible data frame with binary flag, when the websocket is closed, it will only return a nil

I want when the socket is closed, receive can return the close code with the close message, like the websocket_closed event did.
I cannot listen on websocket_closed because firstly my code is synchronized, secondly it's not working well when you opened the same url

commented

Well I just check the doc, websocket_closed seems didn't design to return the close infos, but it actually did, so another doc problem lol :)