You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On both the client (Unity) and the server (Node) I can see that it was able to connect successfully.
However, the server never receives the "message" event that I'm emitting upon connection.
I don't see any errors.
using UnityEngine;
using System;
public class Test : MonoBehaviour
{
void Start() {
var uri = new Uri("ws://localhost:8090");
var client = new SocketIOUnity(uri);
client.OnConnected += async (sender, e) =>
{
Debug.Log("OnConnected");
await client.EmitAsync("message", "bla"); // client.Emit doesn't work either
};
client.OnError += (sender, e) => {
Debug.Log("OnError: " + e);
};
client.Connect();
}
}
@itisnajim Thanks :) My bad it actually worked with the example above as well, the server was throwing a silent error which was extremely hard to notice.
I'm trying to get socket.io to work in Unity.
On both the client (Unity) and the server (Node) I can see that it was able to connect successfully.
However, the server never receives the "message" event that I'm emitting upon connection.
I don't see any errors.
Here's the Node server:
The text was updated successfully, but these errors were encountered: