public static void Emit(string name, string message) { var msg = new MessageData {name = name, message = message}; if(SharedConnection.LoggingEnabled) Debug.Log("Enqueue '" + msg.name + "' " + msg.message); Game.ExecuteOnMainThread.Enqueue(() => SharedConnection.EmitNow(msg)); }
protected void EmitNow(MessageData msg) { // _socket.Emit(msg.name, msg.message); if(LoggingEnabled) Debug.Log("EmitNow '" + msg.name + "' " + msg.message); }