Trying 70006 + Chrome 14 => Unknown command

Sep 21, 2011 at 8:40 AM
Edited Sep 21, 2011 at 8:41 AM

I am using 70006 and Chrome 14. On client, onopen is fired, but when I send a message, server send "Unknown command: 0" or/and "Unknown command:1"

In adition NewSessionConnected is never called :S

Is this normal (and we will wait for a new drop version) or it is a bug?

Thanks for answer.

Coordinator
Sep 21, 2011 at 8:47 AM

Could you pass in subprotocol name to the websocket client, if you are using sub protocol?

ws = new window[support]('ws://<%= Request.Url.Host %>:<%= WebSocketPort %>/sample', 'basic');

Sep 21, 2011 at 9:22 AM
Edited Sep 21, 2011 at 9:27 AM

I do not understand what you mean :S.

¿new window?

Coordinator
Sep 21, 2011 at 9:26 AM

You mean the SuperWebSocketWeb cannot work?

Or your self code?

Coordinator
Sep 21, 2011 at 9:31 AM

In my test, the sample website works in Chrome 14 and Firefox 6.

Did you test against the latest code? Or have you reference latest SuperSocket(1.4 SP1) and latest SuperWebSocket?

Sep 21, 2011 at 9:44 AM

Self code, WebSocketHybi10Test runs correctly

Coordinator
Sep 21, 2011 at 9:46 AM

I don't mean the test case in Test project. Could you try SuperWebSocketWeb project in Samples directory?

Sep 21, 2011 at 9:52 AM
Edited Sep 21, 2011 at 9:53 AM

Mmm... I can't open the sample because "the project type is not supported by this installation” :S

I am using a normal client (html + javascript).

Coordinator
Sep 21, 2011 at 9:57 AM

I think the latest code have already supported hybi-10, and it works for Chrome 14 and Firefox 6.

There is another friend already tried this out, please take a look at the thread below:

http://superwebsocket.codeplex.com/discussions/273222

I think what you should do is downloading the latest code fully and build the SuperWebSocket solution in mainline directory, and then reference the latest SuperWebSocket output in your project.

Sep 21, 2011 at 11:03 AM
Edited Sep 21, 2011 at 11:34 AM

But I am using latest (70006)...

I tried:
-With supersocket project included in my project.
-Compiling mainline externaly and using dll (SuperSocket.Common, SuperSocket.SocketBase, log4net and SuperWebSocket from Release and SuperSocket.SocketEngine from references, net 4.0) All from 70006/mainline.

But same problem everytime:
-Client connects to server (this run correctly)
-Server don't call to new connection event
-Server responses with "Unknown command: 0" to client after connect

-Client sends a message to server
-Server responses with "Unknown command: 1" to client

-Client disconnects -> server call to disconnect event (this event runs correctly).

:S

If it can help, here my code (the same code that I used on DROP 7 + Chrome 13/Firefox 5/... and runs) (WebSocketServerC is because I use custom session):

socket = new WebSocketServerC();
socket.Setup(new RootConfig(), new ServerConfig{
	Port = 8181,
	Ip = "any",
	Name = "server",
	MaxConnectionNumber = 10000,
	Mode = SocketMode.Sync,
	ReceiveBufferSize = 2048,
	SendBufferSize = 2048,
}, SocketServerFactory.Instance);

socket.NewSessionConnected += new SessionEventHandler<CustomSession>(NewSession);
socket.SessionClosed += new SessionEventHandler<CustomSession, CloseReason>(Closed);
socket.NewMessageReceived += new SessionEventHandler<CustomSession, String>(Message);
Coordinator
Sep 21, 2011 at 1:33 PM

I may get the clue...

It may be bug of SuperWebSocket really!

Anyway, I should fix it ASAP.

Coordinator
Sep 21, 2011 at 3:27 PM

I fixed this bug just now, please get the latest code to try!

Sep 21, 2011 at 4:24 PM
Edited Sep 21, 2011 at 4:28 PM

Trying 70014!!

Coordinator
Sep 21, 2011 at 4:28 PM

Oh, which source code are you using? In mainline or work4hybi-00?

You should use the code in mainline.

According the exception, the server processed this request as old websocket version.

Sep 21, 2011 at 4:30 PM
Edited Sep 21, 2011 at 4:31 PM

I wrong and used work4hybi-00 xD, trying mainline!

Edit: Nice job, it runs perfect! you are the best!