Client can send messages.

This commit is contained in:
Karchnu 2020-07-14 17:46:45 +02:00
parent 3c7a43cb54
commit 7d4d59a073

View File

@ -582,7 +582,11 @@ end
class IPC::Client
def send(request : AuthD::Request)
send @server_fd, request.type.to_u8, request.to_json
unless (fd = @server_fd).nil?
send fd, request.type.to_u8, request.to_json
else
raise "Client not connected to the server"
end
end
end