WSS Binary Protocol

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

amateur
Posts: 29
Joined: 07 Jun 2017, 07:18

WSS Binary Protocol

Postby amateur » 07 Jun 2017, 12:56

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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WSS Binary Protocol

Postby Lapo » 07 Jun 2017, 13:51

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
Lapo
--
gotoAndPlay()
...addicted to flash games
amateur
Posts: 29
Joined: 07 Jun 2017, 07:18

Re: WSS Binary Protocol

Postby amateur » 07 Jun 2017, 15:47

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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WSS Binary Protocol

Postby Lapo » 07 Jun 2017, 16:13

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
Lapo

--

gotoAndPlay()

...addicted to flash games
amateur
Posts: 29
Joined: 07 Jun 2017, 07:18

Re: WSS Binary Protocol

Postby amateur » 07 Jun 2017, 16:39

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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WSS Binary Protocol

Postby Lapo » 08 Jun 2017, 10:10

Ok, thanks for your feedback :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 22 guests