Class: Rpush::Daemon::Rpc::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/rpush/daemon/rpc/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(pid) ⇒ Client

Returns a new instance of Client


5
6
7
# File 'lib/rpush/daemon/rpc/client.rb', line 5

def initialize(pid)
  @socket = UNIXSocket.open(Rpc.socket_path(pid))
end

Instance Method Details

#closeObject


13
14
15
16
# File 'lib/rpush/daemon/rpc/client.rb', line 13

def close
  @socket.close
rescue StandardError # rubocop:disable Lint/HandleExceptions
end

#statusObject


9
10
11
# File 'lib/rpush/daemon/rpc/client.rb', line 9

def status
  call(:status)
end