WebGL Can't Using Socket.How to fixed?

I’m know WebGL Only using UnityWebRequest or WWW,but I’m no idea.

Original Code:
IPAddress TgtAddress = IPAddress.Parse(m_ServerIPAddress);
IPEndPoint TgtIpEndpoint = new IPEndPoint(TgtAddress, m_ServerPort);
m_Socket = new Socket ( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
IAsyncResult ConnectResult = m_Socket.BeginConnect( TgtIpEndpoint, new AsyncCallback ( ConnectCallback ), m_Socket );
bool IsConnectSuccess = ConnectResult.AsyncWaitHandle.WaitOne( 5000, true );
How to fix on WebGL?

The answer is simple: You can not use manual sockets like this. This is not a Unity limitation but a limitation of the security sandbox of the browser that runs your wen content. Web applications are not allowed to perform arbitrary network connections. The only things available are the usual HTTP requests (keep in mind that you have cross origin restrictions as well) and WebSockets. WebSockets is a protocol that builds on top of HTTP and provides a two-way communication connection. However it works vastly different from normal sockets. You need a WebSocket library in order to use them. Also the server you want to connect to also need to implement a WebSocket server.

You may try FM WebSockets.
It supports WebGL build with WebSockets communication.

Asset Store Link: http://u3d.as/1DH3

youtube streaming demo for your reference: [ FMETP v1.08 ] Unity WebSocket Live Streaming Demo on all Platforms (WebGL/iOS/Android/Mac/PC/HTML) - YouTube