SuperWebSocket icon indicating copy to clipboard operation
SuperWebSocket copied to clipboard

Unable to read CloseFrame content while closing SuperWebsocket

Open karthikveeraj opened this issue 5 years ago • 0 comments

Unable to read CloseFrame content while closing SuperWebsocket. I see that intentionally you have commented out these lines and not passing them to the callers. https://github.com/kerryjiang/SuperWebSocket/blob/7fb16216970b177700b2e02418f9081943c9df71/SuperWebSocket/Command/Close.cs#L76

I'm dealing with a device which sends different OpCodes and reason while closing the connection, the current implementation doesn't allow them. Can I raise PR to address this issue ? I have made necessary changes.

Changes I have done:

  1. Modified WebSocketSession class Close method to capture the reasonText.

  2. Modified the SuperWebSocket.Command.Close<TWebSocketSession> class by uncommenting the code to extract the close frame content and pass that in the Close method.

karthikveeraj avatar May 27 '19 07:05 karthikveeraj