Archived
3
0

Adding file descriptor to pass to the send functions.

This commit is contained in:
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)) send(fd, utype, Bytes.new(payload.to_unsafe, payload.bytesize))
end end
def send(message : IPC::Message) def send(fd : Int32, message : IPC::Message)
send(message.fd, message.utype, message.payload) send(fd : Int32, message.fd, message.utype, message.payload)
end end
def read(index : UInt32) def read(index : UInt32)

View File

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