Obsolete
/
ipc.cr-old
Archived
3
0
Fork 0

Adding file descriptor to pass to the `send` functions.

ipc07
Karchnu 2020-07-13 15:02:58 +02:00
parent d1c3e9a95a
commit 50ac7152af
2 changed files with 4 additions and 4 deletions

View File

@ -110,8 +110,8 @@ class IPC::Context
send(fd, utype, Bytes.new(payload.to_unsafe, payload.bytesize))
end
def send(message : IPC::Message)
send(message.fd, message.utype, message.payload)
def send(fd : Int32, message : IPC::Message)
send(fd : Int32, message.fd, message.utype, message.payload)
end
def read(index : UInt32)

View File

@ -26,8 +26,8 @@ class IPC::JSON
end
class IPC::Context
def send(message : IPC::JSON)
send message.type.to_u8, message.to_json
def send(fd : Int32, message : IPC::JSON)
send fd : Int32, message.type.to_u8, message.to_json
end
end