Adding file descriptor to pass to the send
functions.
This commit is contained in:
parent
d1c3e9a95a
commit
50ac7152af
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user