Hi, I'm writing a BepInEx Plugin for the game Content Warning, and my WebSocket Client can't receive messages for some reason.
I can see on my server that messages are being received, but I cant send messages to the client.
OnOpen works. What am I doing wrong?
Here's my code, stripped of unnecessary details:
ws = new WebSocket(Plugin.URL.Value);
ws.OnMessage += (sender, evt) =>
{
UnityEngine.Debug.Log(evt.Data); // Nothing Happens
// Handles Data
};
ws.OnError += (sender, evt) =>
{
UnityEngine.Debug.LogError(evt.Message); // Nothing Happens, except if you forcibly close the connection
};
ws.OnOpen += (sender, evt) =>
{
// Send SteamID to Server
UnityEngine.Debug.Log(SteamUser.GetSteamID().m_SteamID.ToString());
ws.Send(SteamUser.GetSteamID().m_SteamID.ToString());
};
ws.Connect();
Hi, I'm writing a BepInEx Plugin for the game Content Warning, and my WebSocket Client can't receive messages for some reason. I can see on my server that messages are being received, but I cant send messages to the client.
OnOpen
works. What am I doing wrong?Here's my code, stripped of unnecessary details: