Multiplayer or networking in HTML5/WebGL build?

How would adding multiplayer or networking functionality to HTML5 games work?
How does a client connect to a server or other client in HTML5?

Thank you.

Assumption: You are planning to work in c++.

I’m not sure what tools are built into the unreal engine source for networking but sockets work in c++ without concern for the platform being used to display the project. Unless I’m misunderstanding the question then the fact you are using HTML5 should be irrelevant to the networking portion of the game.

For an introduction into c/c++ networking in both UDP and TCP I recommend Beej’s Guide though the Unreal Engine may have built in stuff to make it so you don’t have to work at such a low level.

Networking on HTML5 is currently not functional and is very much on cards. Not sure what is the timeline - but its an important feature which is missing right now.

The selected answer does not seems correct. An HTML 5 game will have to run in a browser and from a browser you do not have access to the socket API.