Obsolete
/
ipc.cr-old
Archived
3
0
Fork 0
poll
Karchnu 2020-07-10 14:58:41 +02:00
parent b4bdc44897
commit 46cad71e4b
2 changed files with 5 additions and 3 deletions

View File

@ -131,6 +131,7 @@ lib LibIPC
Closing #
Error #
ParsingError #
Ignore #
end
# Changing the callbacks for switched fd.
@ -138,9 +139,10 @@ lib LibIPC
# , enum ipccb cb_in (fd, *ipc_message)
# , enum ipccb cb_out (fd, *ipc_message)
fun ipc_switching_callbacks(Ctx*, LibC::Int,
cb_in : (LibC::Int, Pointer(LibIPC::Message)) -> LibIPC::IPCCB,
cb_out : (LibC::Int, Pointer(LibIPC::Message)) -> LibIPC::IPCCB) : IPCError
(LibC::Int, LibIPC::Message* -> LibIPC::IPCCB),
(LibC::Int, LibIPC::Message* -> LibIPC::IPCCB))
fun ipc_ctx_switching_add (ctx : Ctx*, fd1 : LibC::Int, fd2 : LibC::Int) # Void
fun ipc_switching_add (switch : Switchings*, fd1 : LibC::Int, fd2 : LibC::Int) # Void
fun ipc_switching_del (switch : Switchings*, fd : LibC::Int ) : LibC::Int
fun ipc_switching_get (switch : Switchings*, fd : LibC::Int ) : LibC::Int

View File

@ -23,7 +23,7 @@ class IPC::Message
def self.from_json (str : String)
jsonmessage = JSONMessage.from_json str
IPC::Message.new jsonmessage.mtype, jsonmessage.utype, jsonmessage.payload
IPC::Message.new 0, jsonmessage.mtype, jsonmessage.utype, jsonmessage.payload
end
def to_json