0.3 drop no longer works with the Microsoft.ServiceModel.WebSockets.DesktopClient.dll

Feb 10, 2012 at 9:13 PM

I've been using the SuperWebSocket and the Microsoft websocket library (Microsoft.ServiceModel.WebSockets.DesktopClient.dll) prototype (http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/info) for a few weeks. The latest 0.3 drop seems to break that connection. The MS client library complains about this error: "Server responded with unrecognized protocol. Header line of server handshake response is not recognized: HTTP/1.1 101 Web Socket Protocol Handshake". Does the SuperWebSocket support multiple websocket draft versions? I am wondering why it is now broken. Thanks.

Coordinator
Feb 11, 2012 at 8:20 AM

Could you send me the handshake request of Microsoft websocket library?

Feb 13, 2012 at 2:21 PM

These are the handshake messages when runing 0.3. The MS client side library complained about the reply and disconnected the socket.

GET /px HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: 10.130.14.166:8080
Sec-WebSocket-Origin: http://tempuri
Sec-WebSocket-Version: 8
Sec-WebSocket-Key: HYcLdXh1Zommhnrqd2S6Ig==


HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Accept: RnbWU65tVpV6dvZKGQXfvxk1OLs=

These are the handshake messages when running 0.2, which worked.

GET /px HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: 10.222.51.128:8080
Sec-WebSocket-Origin: http://tempuri
Sec-WebSocket-Version: 8
Sec-WebSocket-Key: DOL5XKqff2YPbrZygF4Kew==

HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-WebSocket-Accept: SnSMnmJXCpZkRIMobN8OGrywYTY=
Server: WebSocket++/2011-09-25
Upgrade: websocket
Coordinator
Feb 13, 2012 at 2:46 PM

I probably found the clue. I'll fix it soon later.

Coordinator
Feb 13, 2012 at 3:16 PM

Hi, the latest code might have been fixed this bug, please try it out.

Feb 13, 2012 at 3:43 PM

Very good. I just downloaded and tested your latest changeset. The problem appears to be fixed. A suggestion that I would like to give, as your library becomes more mature, is to use some memory profile tool (such as the Ants .net memory profiler) to further optimize the server's memory consumption, especially to support thousands of connections. Thanks a lot for the extreme quick response!

Coordinator
Feb 13, 2012 at 3:50 PM

Great!

Yes, I did some improvements base performance profiling tool which provided by VS2010 ultimate version.

Please share with me, if you have any finding.