SuperWebSocket OnClose throws error undefined on Chrome 23.0.1271.64m

Nov 27, 2012 at 12:41 AM

Hi Kerry,

I was debugging my websocket server today and noticed we are getting error whenever closing the session with Chrome 23.0.1271.64m

DraftHybi10Processor was used and as soon as SendPackage on SendCloseHandshake is sent, I am getting the error.

So, most likely due to some invalid payload data.

Unfortunately, I'm not that good at socket programming / reading the draft, so just wondering if you could help me solving the issue.

Thanks

Coordinator
Nov 27, 2012 at 12:54 AM

Are you using SuperWebSocket? What's the error you got?

Nov 27, 2012 at 2:51 AM

Hi Kerry,

Figured out the error: Chrome browser returns Received a broken close frame containing a reserved status code. due to SuperWebSocket returns 1005 which is forbidden according to the draft.

2nd issue I encountered today is that when you are using secure websockets and the remote client is requesting disconnection, this function is nowhere to be found:

                    this.Close(CloseReason.ClientClosing);

I am aware that using wss:\\ would instantiate AsyncStreamSocketSession instead of AsyncSocketSession.

Coordinator
Nov 27, 2012 at 4:45 PM

How to produce this issue?

I checked the code, the SuperWebSocket merely return the same closing status code to the client. If the closing handshake is from SuperWebSocket, the default closing status code is 1000.

Could you tell me how the connection was closed? From server side or from the browser side?

Marked as answer by technogear on 9/17/2014 at 6:26 PM