This commit is contained in:
Namhyeon Go 2024-01-04 15:55:41 +09:00
commit 7f9840f765
2 changed files with 42 additions and 5 deletions

View File

@ -54,10 +54,20 @@
"description": "Write and read a text on the (named) shared memory",
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
},
{
"id": "sharedmemory_listener",
"description": "Read a text form the (named) shared memory, Repeatly",
{
"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 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");