Some issues related with change set 70033

Sep 23, 2011 at 5:53 AM

Hello kerryjiang,

Thanks for creating a great WebSocket's server API project. I was using your library since the Drop build 6 version and plan to update it with the latest version in the trunk.

When test to use the WebSocket's API change set 70033 in my application, I found a couple of issues:

1. The "NewSessionConnected" event does not get called after the connection success. I found that the "WebSocketServer" class does not override the ExecuteCommand method anymore which is implemented in Drop 6 version to call raise that event.

2. The "SendMessage" method in "DraftHybi10Processor" class fail to send WebSocket's response to client if the playload data length is more than 65536.

    It's because the "index out  of range exception" with: 

       for (int i = 10; i > 1; i--)

    which should be 

for (int i = 9; i > 1; i--)

 

Thanks for your hard work and such a great API.

Coordinator
Sep 23, 2011 at 6:03 AM

The second bug has been fixed in 70029, did you get the real latest code:

http://superwebsocket.codeplex.com/SourceControl/changeset/changes/70029#mainline%2fSuperWebSocket%2fProtocol%2fDraftHybi10Processor.cs

 

ANd I cannot produce the first issue.

I think this issue you mentioned does not exist, because the sample project SuperWebSocketWeb can work for me.

There is an internal method named "OnNewSessionConnected" which will be invoked by Handshake command(Command/Handshake.cs).

internal void OnNewSessionConnected(TWebSocketSession session)

Sep 23, 2011 at 8:44 AM

Sorry,  I was using yesterday built which is the changeset 70014 instead of 70033, sorry about this (70014 was in the top of the list yesterday, does not realize there are a couple of new changes today :) )

So yes, it seems to be fixed in 70029, thanks.

About the the first problem, I am using the source code of SuperSocket with the same version with the latest used in SuperWebSocket instead of the .DLL files included in SuperWebSocket project. My changes in AppServerBase.cs made the ExecuteCommand in Handshake class does not get invoked. But it was fixed now.

Thanks for your quick response.

Coordinator
Sep 23, 2011 at 8:58 AM

Great!