Unity Sockets Query

Hi,

I am making a multiplayer game for IOS, Android, Facebook and WebGL.
I need help in understanding Unity’s System.Net.Sockets and System.Net.Websockets

  1. what is the basic difference between these libraries.
  2. what should i use from the above 2 libraries to target above platforms

Regards

As you have to ask: Don’t use either directly. Try to find a networking solution that supports the platforms for you, then focus on making the game, not some tech you just happen to need.

1 Like
  1. System.Net.Sockets implements low level TCP or UDP communications. System.Net.Websockets implements the Websocket protocol.

  2. WebGL builds do not have access to the System.Net namespace. So the answer is you should use neither and find another solution.