Adding file descriptor to pass to the `send` functions.
parent
d1c3e9a95a
commit
50ac7152af
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Reference in New Issue