mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Update testoader.js
This commit is contained in:
parent
28fd89f22d
commit
bd5bf9ebe0
|
@ -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)"]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user