This https://github.com/JairusSW/native-messaging-assemblyscript/blob/main/nm_assemblyscript_json_as.ts doesn't work.
Expected result is for the host to send back up to 1 MiB to the client per message when more than 1 MiB, up to 64 MiB, is posted to host, Using json-as, if 1 byte more than 1 MiB is posted to the host, nothing else happens...
Steps to reproduce
var n = 0;
var data = Array(209715+1); // Array(209715*64)
var port = chrome.runtime.connectNative("nm_assemblyscript");
port.onMessage.addListener((message) => {
n += message.length;
console.log(message);
if (n === data.length) {
console.log({ n });
n = 0;
}
});
port.onDisconnect.addListener((_) => {
console.log("Disconnected");
if (chrome.runtime.lastError) {
console.log(chrome.runtime.lastError);
}
});
port.postMessage(data);
This https://github.com/JairusSW/native-messaging-assemblyscript/blob/main/nm_assemblyscript_json_as.ts doesn't work.
Expected result is for the host to send back up to 1 MiB to the client per message when more than 1 MiB, up to 64 MiB, is posted to host, Using
json-as, if 1 byte more than 1 MiB is posted to the host, nothing else happens...Steps to reproduce