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
Posts: 27
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
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity, socket or websocket

Postby Lapo » 25 Aug 2020, 08:06

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.

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DavinVicy, DerikFent, Kevengar and 29 guests