create buffer class && some warnings fixes && update manual && create vscode tasks
This commit is contained in:
1 parent
79a79c5409
commit
521d00fdb8
16 files changed
+547
-107
No files matched your search
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
Этот скрипт принимает данные от ipc_send и выводит в консоль
|
||||
]]
|
||||
|
||||
local syscalls = require("syscalls")
|
||||
|
||||
syscalls.SetEventMask(1 << (syscalls.Event.IPC - 1))
|
||||
|
||||
local pid = syscalls.ThreadInfo().PID
|
||||
|
||||
local f = io.open("/tmp0/1/lua_test_ipc_pid", "w")
|
||||
|
||||
if f then
|
||||
f:write(pid)
|
||||
|
||||
f:close()
|
||||
end
|
||||
|
||||
local buffer = syscalls.DefineIPCBuffer(4096)
|
||||
|
||||
|
||||
while true do
|
||||
if syscalls.WaitEvent() == syscalls.Event.IPC then
|
||||
print(buffer:GetLastMessage())
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
скрипт который отправляет данные по IPC
|
||||
]]
|
||||
|
||||
local syscalls = require("syscalls")
|
||||
|
||||
local f = io.open("/tmp0/1/lua_test_ipc_pid", "r")
|
||||
|
||||
local pid
|
||||
|
||||
if f then
|
||||
pid = tonumber(f:read("l"))
|
||||
f:close()
|
||||
end
|
||||
|
||||
if pid then
|
||||
while true do
|
||||
print(syscalls.SendIPCMessage(pid, syscalls.IPC_msg.fromString("Test aboba")))
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user