Unity, socket or websocket

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
khanhdev
Posts: 30
Joined: 24 Mar 2017, 11:32

Unity, socket or websocket

Postby khanhdev » 25 Aug 2020, 04:49

I am using an Unity client. Should I use Socket or Websocket with the Bluebox for the connection. Which one has better performance? What are the advantages and disadvantages? sorry for my English not good.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity, socket or websocket

Postby Lapo » 25 Aug 2020, 08:06

Hi,
in Unity you can use socket for all platforms with exclusion of WebGL which must use Websocket.

Both socket and Websocket can coexist in the same codebase with a bit of conditional compilation. You can take a look at this basic example: http://docs2x.smartfoxserver.com/Exampl ... /connector
to see you can use both at the same time.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 88 guests