Skip to content

JObject lose string value when using IPC to subscribe events & receive data #114

Description

@PatchouliTC

After I read overlayplugin source code,I try to use IPC to subscribe receive data form overlayplugin;
I follow source code, after I call CreateSubscriber(name),I make Svc.PluginInterface.GetIpcSubscriber<JObject, bool>($"IINACT.IpcProvider.{name}") and then send payload to subscribe "CombatData"
code like that:

var commandSender = Svc.PluginInterface.GetIpcSubscriber<JObject, bool>($"IINACT.IpcProvider.{Name}");
var payload = JObject.FromObject(new
{
    call = "subscribe",
    events = new string[]{"CombatData"},
    data = new string[]{"CombatData"},
});
commandSender.InvokeAction(payload);
//receive ignore it

but then i saw logs happend nullreference exception;
so i add some log print into mycode and iinact-overlayplugin-DataReceived(JObject data),
and i find this:
this is what i prepare send to data looks like:
image
and this is what logs print that DataReceived(JObject data) data looks like:
bd8c14e4e7933dd070c6c4f8d670dfef
It seems that dalamoud IPC will list information if use JObject,all string data are miss;
and then I changed overlayplugin IPCHandler,all JObject change to string,and every thing works fine instantly:
image

so I think maybe should change JObject to string like SocketHandler did?(serialize&deserialize to string)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions