- Home /
TcpClient error WebGL
I have a Unity WebGL Project in which I implemented a worldwide Scoreboard. I wrote a Server in Java which handles the Data saving and my Unity Program sends data to a port of the Server.
This is my code which throws the exception:
string message; //holds the message
TcpClient mySocket = new TcpClient(*my url*, *my port*);
NetworkStream theStream = mySocket.GetStream();
StreamWriter theWriter = new StreamWriter(theStream);
theWriter.Write(message);
theWriter.Flush();
mySocket.Close();
I get the error: "System.Net.Sockets.SocketException: No such host is known"
The strange thing about this is, that it is working in the editor and when I build it for PC, but not in WebGL. Is this a known issue or did I do something wrong?
Your answer
Follow this Question
Related Questions
Unity WebGL websocket LLAPI alternatives? 0 Answers
Photon and WebGL random error sending data 3 Answers
Running one instance of webgl build at a time in a html page when loading webgl builds sequencially. 0 Answers
How to send multiple values from browser to unity webgl game? 1 Answer
Loading my game online gets stuck at something about 70% 0 Answers