Sha256: ab2b66de3da00c1ebccac0712dc99a786785c07c887d20e768aa0d3ca6992884
Contents?: true
Size: 514 Bytes
Versions: 38
Compression:
Stored size: 514 Bytes
Contents
module Rpush module Daemon module Rpc class Client def initialize(pid) @socket = UNIXSocket.open(Rpc.socket_path(pid)) end def status call(:status) end def close @socket.close rescue StandardError # rubocop:disable Lint/HandleExceptions end private def call(cmd, args = {}) @socket.puts(JSON.dump([cmd, args])) JSON.parse(@socket.gets) end end end end end
Version data entries
38 entries across 38 versions & 2 rubygems