Hi there, I'm wondering how I can get connections using direct socket access to work with a webGL build. Below is the code I'm trying to translate: Code (CSharp): private TcpClient twitchClient; private StreamReader reader; private StreamWriter writer; public void Connect() { twitchClient = new TcpClient("irc.chat.twitch.tv", 6667); reader = new StreamReader(twitchClient.GetStream()); writer = new StreamWriter(twitchClient.GetStream()); writer.WriteLine("PASS " + password); writer.WriteLine("NICK " + username); writer.WriteLine("USER " + username + " 8 * :" + username); writer.WriteLine("JOIN #" + channelName); writer.Flush(); } Since this method is not available for webGL builds I'm wondering how easy this is to convert to WWW or UnityWebRequest. I'm really not very experienced this this side of things so excuse me if I seem like I don't have a clue what I'm talking about (as I really don't!). I appreciate all and any help, thanks!
Since there is no raw TCP Socket API in JavaScript (and WebAssembly) on the browser, there is no choice but to use WebSocket or HTTP protocol. (There is a new API called Web Transport (QUIC), but it is too new)
Thanks gtk2k - I was hoping someone might have already developed some replacement code for the basic TCPClient calls, using WebSocket