Page 1 of 1

WSS Binary Protocol

Posted: 07 Jun 2017, 12:56
by amateur
I have successfully connected to SmartFox 2.13 with wss and a signed certificate using the latest C# client with a Unity WebGL build.

I'd like to use the new binary protocol but it fails to connect if I select it.

Are there changes needed on the client side to support binary websockets?

Sorry to ask here but the online documentation is contradictory in places.

Thanks

Re: WSS Binary Protocol

Posted: 07 Jun 2017, 13:51
by Lapo
Hi,
have you turned it on from server side first?
Take a look here too:
http://docs2x.smartfoxserver.com/Gettin ... ration-213

hope it helps

Re: WSS Binary Protocol

Posted: 07 Jun 2017, 15:47
by amateur
Yes, I have turned it on on the server. It fails when it is turned on, works if I turn it off.

I wondered if I need to change anything on the client side for it to work but the documentation you have pointed to doesn't say so.

Perhaps I am too early and it isn't working with the latest client for C# projects yet?

Many thanks

Re: WSS Binary Protocol

Posted: 07 Jun 2017, 16:13
by Lapo
What platform are you testing on? Windows? Mac?
When you say that it fails connecting do you have specific errors on the client or server side?
If so, please post them here.

Thanks

Re: WSS Binary Protocol

Posted: 07 Jun 2017, 16:39
by amateur
I found the answer after a bit of hunting and trial and error.

I had to change
smartFox = new SmartFox(UseWebSocket.WSS);

to:
smartFox = new SmartFox(UseWebSocket.WSS_BIN);

Now it all works perfectly - it also fixed a float / double conversion bug we'd been suffering.

Thankyou

Re: WSS Binary Protocol

Posted: 08 Jun 2017, 10:10
by Lapo
Ok, thanks for your feedback :)