Class: Rpush::Daemon::Rpc::Client
- Inherits:
-
Object
- Object
- Rpush::Daemon::Rpc::Client
- Defined in:
- lib/rpush/daemon/rpc/client.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(pid) ⇒ Client
constructor
A new instance of Client.
- #status ⇒ Object
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
#close ⇒ Object
13 14 15 16 |
# File 'lib/rpush/daemon/rpc/client.rb', line 13 def close @socket.close rescue StandardError # rubocop:disable Lint/HandleExceptions end |
#status ⇒ Object
9 10 11 |
# File 'lib/rpush/daemon/rpc/client.rb', line 9 def status call(:status) end |