Update testoader.js

This commit is contained in:
Namhyeon Go 2024-01-04 15:47:05 +09:00
parent 28fd89f22d
commit bd5bf9ebe0
2 changed files with 39 additions and 2 deletions

View File

@ -55,8 +55,18 @@
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
},
{
"id": "sharedmemory_write",
"description": "Write a text to the (named) shared memory",
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
},
{
"id": "sharedmemory_read",
"description": "Read a text from the (named) shared memory",
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
}
{
"id": "sharedmemory_listener",
"description": "Read a text form the (named) shared memory, Repeatly",
"description": "Read a text from the (named) shared memory, Repeatly",
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
}
]

View File

@ -847,7 +847,7 @@ var test_implements = {
console.log("Writing a text the to shared memory...");
mem.writeText("nice meet you");
console.log("Writing a text from the shared memory...");
console.log("Reading a text from the shared memory...");
console.log(mem.readText() + ", too");
console.log("Cleaning the shared memory...");
@ -859,6 +859,33 @@ var test_implements = {
console.log("Done");
},
"sharedmemory_write": function() {
var Toolkit = require("lib/toolkit");
var mem = new Toolkit.NamedSharedMemory("welsonjs_test");
console.log("Writing a text to the shared memory...");
mem.writeText("nice meet you");
console.log("Done");
},
"sharedmemory_read": function() {
var Toolkit = require("lib/toolkit");
var mem = new Toolkit.NamedSharedMemory("welsonjs_test");
console.log("Reading a text from the shared memory...");
console.log(mem.readText() + ", too");
console.log("Cleaning the shared memory...");
mem.clear()
console.log(mem.readText());
mem.close()
console.log("Closing the shared memory...");
console.log("Done");
},
"sharedmemory_listener": function() {
var Toolkit = require("lib/toolkit");